Downloads · 30 days
11
4% of all-time downloads
dk409/emotion-roberta
emotion-roberta is a text classification model from dk409. 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.
A fine-tuned roberta-base model for classifying text into 6 emotions: sadness, joy, love, anger, fear, surprise.
Downloads · 30 days
11
4% of all-time downloads
All-time downloads
250
Public
Parameters
125M
499 MB on disk
Likes
1
Public
Click a slice to open those files.
.safetensors499 MB · 99%
From the Hugging Face model README
A fine-tuned roberta-base model for classifying text into 6 emotions:
sadness, joy, love, anger, fear, surprise.
roberta-baseUpdate these with your actual results after training:
| Metric | Score |
|---|---|
| Test Accuracy | ~93% |
| Weighted F1 | ~93% |
from transformers import pipeline
classifier = pipeline("text-classification", model="dk409/emotion-roberta", top_k=None)
result = classifier("I'm so happy today!")
print(result)
# [[{{'label': 'joy', 'score': 0.98}}, {{'label': 'love', 'score': 0.01}}, ...]]
| ID | Label |
|---|---|
| 0 | sadness |
| 1 | joy |
| 2 | love |
| 3 | anger |
| 4 | fear |
| 5 | surprise |