dair-ai/emotion
Viewer • Updated • 437k • 28.3k • 449
This model is a fine-tuned version of distilbert-base-uncased on the Emotion dataset for detecting emotions in English Twitter text.
The model classifies text into six basic emotions:
| Label | Emotion |
|---|---|
| 0 | sadness |
| 1 | joy |
| 2 | love |
| 3 | anger |
| 4 | fear |
| 5 | surprise |
| Parameter | Value |
|---|---|
| Base Model | distilbert-base-uncased |
| Dataset | emotion (16,000 train / 2,000 validation) |
| Epochs | 1 |
| Learning Rate | 1e-3 |
| Batch Size | 8 |
| Weight Decay | 0.01 |
from transformers import pipeline
classifier = pipeline(
"text-classification",
model="<your-username>/distilbert-finetuned-emotion"
)
result = classifier("I am feeling great today!")
print(result)
# [{'label': 'joy', 'score': 0.98}]
joy and sadness are overrepresentedsurprise and love are the most challenging categoriesApache 2.0