Update README.md
Browse files
README.md
CHANGED
@@ -26,12 +26,12 @@ pip install transformers
|
|
26 |
```
|
27 |
|
28 |
```python
|
29 |
-
from transformers import AutoModelForSequenceClassification,
|
30 |
import torch
|
31 |
|
32 |
# Load the model and tokenizer from Hugging Face Hub
|
33 |
model_name = "LocalDoc/sentiment_analysis_azerbaijani"
|
34 |
-
tokenizer =
|
35 |
model = AutoModelForSequenceClassification.from_pretrained(model_name)
|
36 |
|
37 |
def predict_sentiment(text):
|
|
|
26 |
```
|
27 |
|
28 |
```python
|
29 |
+
from transformers import AutoModelForSequenceClassification, XLMRobertaTokenizer
|
30 |
import torch
|
31 |
|
32 |
# Load the model and tokenizer from Hugging Face Hub
|
33 |
model_name = "LocalDoc/sentiment_analysis_azerbaijani"
|
34 |
+
tokenizer = XLMRobertaTokenizer.from_pretrained(model_name)
|
35 |
model = AutoModelForSequenceClassification.from_pretrained(model_name)
|
36 |
|
37 |
def predict_sentiment(text):
|