Downloads · 30 days
5
28% of all-time downloads
tangxiaoxia/emotion-classifier
emotion-classifier is a machine learning model from tangxiaoxia. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
Emotion classification model fine-tuned on emotion dataset.
Downloads · 30 days
5
28% of all-time downloads
All-time downloads
18
Public
Repo size
268 MB
Likes
0
Public
Click a slice to open those files.
.bin268 MB · 100%
From the Hugging Face model README
Emotion classification model fine-tuned on emotion dataset.
from transformers import AutoModelForSequenceClassification, AutoTokenizer
model = AutoModelForSequenceClassification.from_pretrained("tangxiaoxia/emotion-classifier")
tokenizer = AutoTokenizer.from_pretrained("tangxiaoxia/emotion-classifier")
# Example
text = "I am very happy today!"
inputs = tokenizer(text, return_tensors="pt")
outputs = model(**inputs)
predictions = outputs.logits.argmax(-1)