Downloads · 30 days
11
9% of all-time downloads
linlin336/distilbert-finetuned-emotion
distilbert-finetuned-emotion is a text classification model from linlin336. Use it when you need a label for a piece of text. The card lists the license as apache-2.0.
This model is a fine-tuned version of distilbert-base-uncased on the Emotion dataset for detecting emotions in English Twitter text.
Downloads · 30 days
11
9% of all-time downloads
All-time downloads
117
Public
Parameters
67M
268 MB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors268 MB · 100%
From the Hugging Face model README
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