dair-ai/emotion
Viewer • Updated • 437k • 34.5k • 443
How to use mehmet0sahinn/distilbert-emotion with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-classification", model="mehmet0sahinn/distilbert-emotion") # Load model directly
from transformers import AutoTokenizer, AutoModelForSequenceClassification
tokenizer = AutoTokenizer.from_pretrained("mehmet0sahinn/distilbert-emotion")
model = AutoModelForSequenceClassification.from_pretrained("mehmet0sahinn/distilbert-emotion")This model fine-tuned distilbert-base-uncased on the dair-ai/emotion (Labeled English Tweets) dataset for lightweight emotion recognition.
| SADNESS | JOY | LOVE | ANGER | FEAR | SURPRISE |
| Training Loss | Epoch | Step | Validation Loss | Accuracy |
|---|---|---|---|---|
| No log | 1.0 | 125 | 0.2232 | 0.9215 |
| No log | 2.0 | 250 | 0.1552 | 0.9385 |
| No log | 3.0 | 375 | 0.1469 | 0.9375 |
| 0.2724 | 4.0 | 500 | 0.1395 | 0.933 |
from transformers import pipeline
classifier = pipeline(
task="text-classification",
model="mehmet0sahinn/distilbert-emotion",
)
text = "I'm absolutely thrilled this works like a charm!"
print(classifier(text))
This model is licensed under the MIT License.
Base model
distilbert/distilbert-base-uncased