Spanish Emotion Classification
Usage
from transformers import pipeline
pipe = pipeline("text-classification",
model = "camilum/emotions-DistilBETO",
tokenizer = "dccuchile/distilbert-base-spanish-uncased", # NOTE Do not delete this
padding = True,
truncation = "longest_first",
top_k = None,
)
print(list(pipe("estoy triste")))
print(list(pipe("estoy triste " * 1024)))
Output
[[{'label': 'LABEL_6', 'score': 0.9897441267967224}, {'label': 'LABEL_0', 'score': 0.004266336094588041}, {'label': 'LABEL_2', 'score': 0.0014442066894844174}, {'label': 'LABEL_1', 'score': 0.001328755053691566}, {'label': 'LABEL_5', 'score': 0.001040525734424591}, {'label': 'LABEL_3', 'score': 0.0009753472404554486}, {'label': 'LABEL_4', 'score': 0.0008171153021976352}, {'label': 'LABEL_7', 'score': 0.0003837039403151721}]]
[[{'label': 'LABEL_6', 'score': 0.9416162967681885}, {'label': 'LABEL_0', 'score': 0.03937496617436409}, {'label': 'LABEL_1', 'score': 0.00783670973032713}, {'label': 'LABEL_2', 'score': 0.004338116850703955}, {'label': 'LABEL_5', 'score': 0.0027957989368587732}, {'label': 'LABEL_4', 'score': 0.0017090848414227366}, {'label': 'LABEL_3', 'score': 0.0014251844258978963}, {'label': 'LABEL_7', 'score': 0.0009038725402206182}]]
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
- 4
Inference Providers
NEW
This model isn't deployed by any Inference Provider.
๐
Ask for provider support