Downloads · 30 days
0
MahnoorIqbal/emotion-classification-distilbert
emotion-classification-distilbert is a text classification model from MahnoorIqbal. Use it when you need a label for a piece of text. It is set up for transformers. The card lists the license as mit.
Fine-tuned DistilBERT model for classifying text into 6 emotions: sadness, joy, love, anger, fear, and surprise.
Downloads · 30 days
0
Access
Public
Updated Jul 14, 2026
Repo size
—
Likes
0
Public
Click a slice to open those files.
.json712 KB · 99%
From the Hugging Face model README
Fine-tuned DistilBERT model for classifying text into 6 emotions: sadness, joy, love, anger, fear, and surprise.
Classifying short English text into one of 6 emotion categories. Suitable for social media analysis, sentiment pipelines, or mental health monitoring tools.
from transformers import pipeline
classifier = pipeline(
"text-classification",
model="MahnoorIqbal/emotion-classification-distilbert"
)
classifier("I can't believe this actually worked!")
# [{'label': 'surprise', 'score': 0.91}]
praveengovi/emotions-dataset-for-nlp — 16,000 training samples across 6 emotion classes.
Class distribution is imbalanced (joy: 5,362 vs surprise: 572), handled via inverse-frequency class weights in the loss function.
| Class | Precision | Recall | F1 | Support |
|---|---|---|---|---|
| sadness | 0.96 | 0.96 | 0.96 | 581 |
| joy | 0.95 | 0.94 | 0.94 | 695 |
| love | 0.80 | 0.86 | 0.83 | 159 |
| anger | 0.92 | 0.92 | 0.92 | 275 |
| fear | 0.87 | 0.90 | 0.89 | 224 |
| surprise | 0.78 | 0.68 | 0.73 | 66 |