--- language: en license: apache-2.0 tags: - text-classification - emotion - emotion-detection - affective-computing - distilbert - transformers - pytorch pipeline_tag: text-classification widget: - text: "I was skeptical at first, but the results completely blew me away with how good it turned out!" example_title: "Joy Example" - text: "I have been sitting here in complete darkness, feeling utterly exhausted and defeated." example_title: "Sadness Example" - text: "Get out of my face right now before I lose my temper completely!" example_title: "Anger Example" - text: "Every single moment spent with you makes my life feel infinitely more meaningful." example_title: "Love Example" --- # 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. - **Author**: [Jayan Gupta](https://huggingface.co/Jayan12321) --- ## 🎯 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 ```python 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}] ```