Views
No views yet
bert-for-sequence-classificationtransformers library:1from transformers import pipeline
2
3classifier = pipeline("text-classification", model="ShazaAly/syplyd-marbert-1")
4
5# Example 1
6text_1 = "عايز أعرف الأوردر بتاعي هيوصل امتى؟"
7print(classifier(text_1))
8# Output: [{'label': 'track_order_status', 'score': ...}]
9
10# Example 2
11text_2 = "المنتج ده غالي، فيه بديل أرخص؟"
12print(classifier(text_2))
13# Output: [{'label': 'product_alternatives', 'score': ...}]