Views
No views yet
Fayad11/fine_tuned_emotion_inference_modeltransformers library, or locally alongside its associated EmotionPredictor wrapper (as demonstrated in the project notebooks).transformers pipeline1from transformers import pipeline
2
3# Load the model directly from the Hugging Face hub
4emotion_classifier = pipeline("text-classification", model="Fayad11/fine_tuned_emotion_inference_model")
5
6text = "I'm sad because I lost my keys."
7result = emotion_classifier(text)
8
9print(result)
10# Output: [{'label': 'sadness', 'score': 0.98...}]