en-naxai-ai-sentiment-classification-154012122023(latest)
The model is trained on the sentiment classification task in English. It uses 3 labels: -1, 0 and 1. These labels represent negative, neutral and positive sentiments.
This model is finetuned from DistilBERT base model (uncased). This model is a distilled version of the BERT base model. This model is uncased: it does not make a difference between english and English.
Model Details
- Language: en
- Problem type: Multi-class Classification
- Model Architecture: Distilbert base uncased
- Model Name: en-naxai-ai-sentiment-classification-154012122023
- Creation date: 15:40h 12/12/2023
- CO2 Emissions (in grams): 0.06
Classification Report:
Label | Precision | Recall | f1-Score | Support |
---|---|---|---|---|
-1 | 0.94 | 0.94 | 0.94 | 4870 |
0 | 0.58 | 0.59 | 0.59 | 867 |
1 | 0.91 | 0.90 | 0.91 | 2856 |
How to use this model
You can use Python to access this model:
from transformers import pipeline
analyzer = pipeline(
task='text-classification',
model=“botdevringring/en-naxai-ai-sentiment-classification-154012122023”,
tokenizer="botdevringring/en-naxai-ai-sentiment-classification-154012122023"
)
result = analyzer(
"Good service for a fair price. Friendly and attentive staff."
)
result
[{'label': '2', 'score': 0.515792965888977}]
Python API:
from transformers import AutoModelForSequenceClassification, AutoTokenizer
model = AutoModelForSequenceClassification.from_pretrained("botdevringring/en-naxai-ai-sentiment-classification-154012122023", use_auth_token=True)
tokenizer = AutoTokenizer.from_pretrained("botdevringring/en-naxai-ai-sentiment-classification-154012122023", use_auth_token=True)
inputs = tokenizer("Good service for a fair price. Friendly and attentive staff.", return_tensors="pt")
outputs = model(**inputs)
Or you can use cURL:
curl https://api-inference.huggingface.co/models/botdevringring/en-naxai-ai-sentiment-classification-154012122023 \
-X POST \
-d '{"inputs": "Good service for a fair price. Friendly and attentive staff."}' \
-H 'Content-Type: application/json' \
-H "Authorization: Bearer <Your HF API token>"
Acknowledgements
Model trained by Eduardo Brigham for Naxai powered by The Ring Ring Company
- Downloads last month
- 6
Evaluation results
- Accuracy on sentimenttest set self-reported0.886
- loss on sentimenttest set self-reported0.337
- Precision Macro on sentimenttest set self-reported0.827
- Precision Micro on sentimenttest set self-reported0.886
- Precision Weighted on sentimenttest set self-reported0.880
- Recall Macro on sentimenttest set self-reported0.777
- Recall Micro on sentimenttest set self-reported0.886
- Recall Weighted on sentimenttest set self-reported0.886
- F1 Macro on sentimenttest set self-reported0.794
- F1 Micro on sentimenttest set self-reported0.886
- F1 Weighted on sentimenttest set self-reported0.881
- samples p/second on sentimenttest set self-reported179.335
- steps p/second on sentimenttest set self-reported22.432
- epochs on sentimenttest set self-reported7.000