Text Classification
Transformers
PyTorch
Arabic
bert
text classification
news
text-embeddings-inference
Instructions to use Ammar-alhaj-ali/arabic-MARBERT-news-article-classification with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Ammar-alhaj-ali/arabic-MARBERT-news-article-classification with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="Ammar-alhaj-ali/arabic-MARBERT-news-article-classification")# Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("Ammar-alhaj-ali/arabic-MARBERT-news-article-classification") model = AutoModelForSequenceClassification.from_pretrained("Ammar-alhaj-ali/arabic-MARBERT-news-article-classification") - Inference
- Notebooks
- Google Colab
- Kaggle
Arabic MARBERT News Article Classification Model
Model description
arabic-MARBERT-news-article-classification Model is a news article classification model that was built by fine-tuning the MARBERT model. For the fine-tuning, I used SANAD: Single-Label Arabic News Articles Dataset that includes 7 labels(Culture,Finance,Medical,Politics,Religion,Sports,and Tech).
How to use
To use the model with a transformers pipeline:
>>>from transformers import pipeline
>>>model = pipeline('text-classification', model='Ammar-alhaj-ali/arabic-MARBERT-news-article-classification')
>>>sentences = ['أخطرت شركة أرامكو السعودية 4 على الأقل من المشترين في شمال آسيا بأنها ستورد إليهم الكميات المتعاقد عليها من النفط الخام كاملة في سبتمبرأيلول المقبل. وقالت مصادر مطلعة لرويترز إن السعودية، أكبر مصدر النفط في العالم، كانت قد رفعت سعر البيع الرسمي للمشترين الآسيويين إلى مستويات قياسية لذلك الشهر.']
>>>model(sentences)
[{'label': 'Finance', 'score': 0.9998553991317749}]
- Downloads last month
- 9,921