Downloads · 30 days
12
6% of all-time downloads
Swoodplays/emotion-classification
emotion-classification is a machine learning model from Swoodplays. Use it for the machine learning task on the model card, and read the license before you ship it in a product. The card lists the license as apache-2.0.
should probably proofread and complete it, then remove this comment. --
Downloads · 30 days
12
6% of all-time downloads
All-time downloads
191
Public
Parameters
67M
2.4 GB on disk
Likes
0
Public
Click a slice to open those files.
.pt3.2 GB · 60%
From the Hugging Face model README
This model is a fine-tuned version of distilbert-base-uncased on an unknown dataset. It achieves the following results on the evaluation set:
This model is fine-tuned on the 'emotion' dataset to classify text into six emotion categories: sadness, joy, love, anger, fear, and surprise.
from transformers import pipeline
import pandas as pd
emt_clf = pipeline("text-classification", model="Swoodplays/emotion-classification")
text = "I saw a movie today and it was really good."
preds = emt_clf(text, return_all_scores=True)
labels = ['sadness', 'joy', 'love', 'anger', 'fear', 'surprise']
print(preds)
preds_df = pd.DataFrame(preds[0])
plt.bar(labels, 100 * preds_df["score"])
plt.title(f'"{text}"')
plt.xlabel("Classfied emotions")
plt.ylabel("Class probability (%)")
plt.show()
dair-ai/emotion
The following hyperparameters were used during training:
| Training Loss | Epoch | Step | Validation Loss | Accuracy | F1 score |
|---|---|---|---|---|---|
| No log | 1.0 | 125 | 0.4449 | 0.873 | 0.8654 |
| No log | 2.0 | 250 | 0.2166 | 0.9265 | 0.9270 |
| No log | 3.0 | 375 | 0.1726 | 0.933 | 0.9339 |
| No log | 4.0 | 500 | 0.1552 | 0.9385 | 0.9386 |
| No log | 5.0 | 625 | 0.1439 | 0.938 | 0.9383 |
| No log | 6.0 | 750 | 0.1435 | 0.937 | 0.9370 |
| No log | 7.0 | 875 | 0.1481 | 0.9355 | 0.9356 |
| No log | 8.0 | 1000 | 0.1402 | 0.935 | 0.9352 |
| No log | 9.0 | 1125 | 0.1491 | 0.9355 | 0.9355 |
| No log | 10.0 | 1250 | 0.1464 | 0.9375 | 0.9376 |