DistilBERT Multiclass Emotion Classifier 🎭

A fine-tuned DistilBERT (Distilled Bidirectional Encoder Representations from Transformers) sequence classification model trained to detect nuanced affective and emotional states from unstructured natural language.


🎯 Model Overview & Classes

The model classifies text across 6 primary emotional dimensions:

  • 0: Sadness (grief, sorrow, exhaustion)
  • 1: Joy (happiness, triumph, gratitude)
  • 2: Love (affection, admiration, intimacy)
  • 3: Anger (irritation, frustration, rage)
  • 4: Fear (anxiety, dread, panic)
  • 5: Surprise (shock, amazement, disbelief)

πŸ’» Python Quickstart with Transformers Pipeline

from transformers import pipeline

# Load fine-tuned pipeline directly from Hugging Face
classifier = pipeline(
    "text-classification",
    model="Jayan12321/distilbert-emotion-classifier"
)

# Run inference
sample_text = "I received the scholarship offer this morning and I cannot stop smiling!"
prediction = classifier(sample_text)

print(prediction)
# Output: [{'label': 'joy', 'score': 0.987}]
Downloads last month
31
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support

Collection including Jayan12321/distilbert-emotion-classifier