Instructions to use LocalDoc/sentiment_analysis_azerbaijani with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use LocalDoc/sentiment_analysis_azerbaijani with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="LocalDoc/sentiment_analysis_azerbaijani")# Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("LocalDoc/sentiment_analysis_azerbaijani") model = AutoModelForSequenceClassification.from_pretrained("LocalDoc/sentiment_analysis_azerbaijani") - Notebooks
- Google Colab
- Kaggle
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):
|