Downloads · 30 days
5
23% of all-time downloads
ithattieu/distilbert-base-uncased-finetuned-emotions-text-classification
distilbert-base-uncased-finetuned-emotions-text-classification is a machine learning model from ithattieu. 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
5
23% of all-time downloads
All-time downloads
22
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 emotion dataset. It achieves the following results on the evaluation set:
More information needed
import pandas as pd
from transformers import pipeline
import pandas as pd
import matplotlib.pyplot as plt
model_id = 'ithattieu/distilbert-base-uncased-finetuned-emotions-text-classification'
classifier = pipeline('text-classification', model=model_id)
labels = ['sadness', 'joy', 'love', 'anger', 'fear', 'surprise']
text = 'I am not a really smart lady, which makes it challenging to grasp certain concepts, but you made it super easy to understand NLP and relevant applications. So, thank you!'
preds_df = pd.DataFrame(preds[0])
preds = classifier(text, return_all_scores=True)
preds_df = pd.DataFrame(preds[0])
plt.bar(labels, 100 * preds_df["score"], color='C0')
plt.title(f'"{text}"')
plt.ylabel("Class probability (%)")
plt.show()
More information needed
The following hyperparameters were used during training:
| Training Loss | Epoch | Step | Validation Loss | Accuracy | F1 |
|---|---|---|---|---|---|
| 0.8161 | 1.0 | 250 | 0.3051 | 0.912 | 0.9114 |
| 0.2464 | 2.0 | 500 | 0.2130 | 0.928 | 0.9278 |