Text Classification
Transformers
PyTorch
Arabic
bert
text classification
Sentiment
text-embeddings-inference
Instructions to use Ammar-alhaj-ali/arabic-MARBERT-sentiment with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Ammar-alhaj-ali/arabic-MARBERT-sentiment with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="Ammar-alhaj-ali/arabic-MARBERT-sentiment")# Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("Ammar-alhaj-ali/arabic-MARBERT-sentiment") model = AutoModelForSequenceClassification.from_pretrained("Ammar-alhaj-ali/arabic-MARBERT-sentiment") - Notebooks
- Google Colab
- Kaggle
Arabic-MARBERT-Sentiment Model
Model description
Arabic-MARBERT-Sentiment Model is a Sentiment analysis model that was built by fine-tuning the MARBERT model. For the fine-tuning, I used KAUST dataset, which includes 3 labels(positive,negative,and neutral).
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-sentiment')
>>>sentences = ['لقد استمتعت بالحفلة', 'خدمة المطعم كانت محبطة']
>>>model(sentences)
[{'label': 'positive', 'score': 0.9577557444572449},
{'label': 'negative', 'score': 0.9158180952072144}]
- Downloads last month
- 507