Spanish Emotion Classification

Usage

from transformers import pipeline

pipe = pipeline("text-classification",
    model      = "camilum/emotions-BETO-uncased",
    padding    = True,
    truncation = "longest_first",
    top_k      = None
)

print(list(pipe("estoy triste")))
print(list(pipe("estoy triste" * 1024)))

Output

[[{'label': 'sadness', 'score': 0.9985587000846863}, {'label': 'fear', 'score': 0.000408734631491825}, {'label': 'joy', 'score': 0.0002496271627023816}, {'label': 'anger', 'score': 0.00022718278341926634}, {'label': 'neutral', 'score': 0.00017562056018505245}, {'label': 'others', 'score': 0.00015616531891282648}, {'label': 'surprise', 'score': 0.00012429524213075638}, {'label': 'disgust', 'score': 9.977085574064404e-05}]]
[[{'label': 'sadness', 'score': 0.9396132826805115}, {'label': 'joy', 'score': 0.023490000516176224}, {'label': 'neutral', 'score': 0.015399268828332424}, {'label': 'fear', 'score': 0.008135460317134857}, {'label': 'others', 'score': 0.00671452097594738}, {'label': 'disgust', 'score': 0.004311822820454836}, {'label': 'anger', 'score': 0.0016200717072933912}, {'label': 'surprise', 'score': 0.0007155040511861444}]]

Dependencies

  • Python 3.10.15
  • Transformers 4.50.3
  • Torch 2.6.0

requirements.txt:

transformers==4.50.3
torch==2.6.0
Downloads last month
11
Safetensors
Model size
0.1B params
Tensor type
F32
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support