dair-ai/emotion
Viewer • Updated • 437k • 36.1k • 444
This is a fine-tuned text classification model for Emotion Detection. It predicts the underlying emotion of a given text sequence. The model is an asset evaluated alongside the broader NLP processing pipelines built by Fayad11.
Fayad11/fine_tuned_emotion_inference_modelYou can use this model in your application via the Hugging Face transformers library, or locally alongside its associated EmotionPredictor wrapper (as demonstrated in the project notebooks).
transformers pipeline
from transformers import pipeline
# Load the model directly from the Hugging Face hub
emotion_classifier = pipeline("text-classification", model="Fayad11/fine_tuned_emotion_inference_model")
text = "I'm sad because I lost my keys."
result = emotion_classifier(text)
print(result)
# Output: [{'label': 'sadness', 'score': 0.98...}]