Downloads · 30 days
14
1% of all-time downloads
Dimi-G/roberta-base-emotion
roberta-base-emotion is a text classification model from Dimi-G. Use it when you need a label for a piece of text. It is set up for transformers. The card lists the license as apache-2.0.
This model is a fine-tuned version of RoBERTaForSequenceClassification trained to classify text into six emotion categories: Sadness, Joy, Love, Anger, Fear, and Surprise. - RoBERTa - Special thanks to bhadresh-savani…
Downloads · 30 days
14
1% of all-time downloads
All-time downloads
1.1K
Public
Parameters
125M
997 MB on disk
Likes
1
Public
Click a slice to open those files.
.safetensors499 MB · 99%
From the Hugging Face model README
This model is a fine-tuned version of RoBERTaForSequenceClassification trained to classify text into six emotion categories: Sadness, Joy, Love, Anger, Fear, and Surprise.
The model is intended for classifying emotions in text data. It can be used in applications involving sentiment analysis, chatbots, social media monitoring, diary entries.
from transformers import pipeline
classifier = pipeline(model="Dimi-G/roberta-base-emotion")
emotions=classifier("i feel very happy and excited since i learned so many things", top_k=None)
print(emotions)
"""
Output:
[{'label': 'Joy', 'score': 0.9991986155509949},
{'label': 'Love', 'score': 0.0003064649645239115},
{'label': 'Sadness', 'score': 0.0001680034474702552},
{'label': 'Anger', 'score': 0.00012623333896044642},
{'label': 'Surprise', 'score': 0.00011396403715480119},
{'label': 'Fear', 'score': 8.671794785186648e-05}]
"""
The model was trained on a randomized subset of the dar-ai/emotion dataset from the Hugging Face datasets library. Here are the training parameters:
{'eval_loss': 0.18195335566997528,
'eval_accuracy': 0.94,
'eval_f1': 0.9396676959491667,
'eval_runtime': 1.1646,
'eval_samples_per_second': 858.685,
'eval_steps_per_second': 13.739,
'epoch': 10.0}
Link to the notebook with details on fine-tuning the model and our approach with other models for emotion classification:
Carbon emissions can be estimated using the Machine Learning Impact calculator presented in Lacoste et al. (2019).