Update README.md
Browse files
README.md
CHANGED
|
@@ -64,6 +64,8 @@ The model was trained using the notebook available at [Kaggle](https://www.kaggl
|
|
| 64 |
|
| 65 |
To use the `moazx/AraBERT-Restaurant-Sentiment` model, you can load it using the Hugging Face `transformers` library. Below is an example of how to use the model to classify a restaurant review:
|
| 66 |
|
|
|
|
|
|
|
| 67 |
from transformers import AutoTokenizer, AutoModelForSequenceClassification
|
| 68 |
import torch
|
| 69 |
|
|
@@ -87,8 +89,7 @@ predicted_class = "إيجابي" if positive_prob > negative_prob else "سلبي
|
|
| 87 |
print(f"التصنيف المتوقع: {predicted_class}")
|
| 88 |
print(f"احتمالية سلبي: {negative_prob:.2f}")
|
| 89 |
print(f"احتمالية إيجابي: {positive_prob:.2f}")
|
| 90 |
-
|
| 91 |
-
'''
|
| 92 |
|
| 93 |
## Acknowledgements
|
| 94 |
|
|
|
|
| 64 |
|
| 65 |
To use the `moazx/AraBERT-Restaurant-Sentiment` model, you can load it using the Hugging Face `transformers` library. Below is an example of how to use the model to classify a restaurant review:
|
| 66 |
|
| 67 |
+
|
| 68 |
+
```python
|
| 69 |
from transformers import AutoTokenizer, AutoModelForSequenceClassification
|
| 70 |
import torch
|
| 71 |
|
|
|
|
| 89 |
print(f"التصنيف المتوقع: {predicted_class}")
|
| 90 |
print(f"احتمالية سلبي: {negative_prob:.2f}")
|
| 91 |
print(f"احتمالية إيجابي: {positive_prob:.2f}")
|
| 92 |
+
```
|
|
|
|
| 93 |
|
| 94 |
## Acknowledgements
|
| 95 |
|