Instructions to use qandos0/SentimentArEng with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use qandos0/SentimentArEng with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="qandos0/SentimentArEng")# Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("qandos0/SentimentArEng") model = AutoModelForSequenceClassification.from_pretrained("qandos0/SentimentArEng") - Notebooks
- Google Colab
- Kaggle
Update README.md
Browse files
README.md
CHANGED
|
@@ -20,6 +20,19 @@ It achieves the following results on the evaluation set:
|
|
| 20 |
- Loss: 0.502831
|
| 21 |
- Accuracy: 0.798512
|
| 22 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 23 |
|
| 24 |
## Training and evaluation data
|
| 25 |
|
|
|
|
| 20 |
- Loss: 0.502831
|
| 21 |
- Accuracy: 0.798512
|
| 22 |
|
| 23 |
+
# inference with pipeline
|
| 24 |
+
|
| 25 |
+
```
|
| 26 |
+
from transformers import pipeline
|
| 27 |
+
model_path = "Noor0/SentimentArEng"
|
| 28 |
+
sentiment_task = pipeline("sentiment-analysis", model=model_path, tokenizer=model_path)
|
| 29 |
+
sentiment_task("تعامل الموظفين كان أقل من المتوقع")
|
| 30 |
+
|
| 31 |
+
```
|
| 32 |
+
|
| 33 |
+
- output:
|
| 34 |
+
- [{'label': 'negative', 'score': 0.9905518293380737}]
|
| 35 |
+
|
| 36 |
|
| 37 |
## Training and evaluation data
|
| 38 |
|