File size: 1,390 Bytes
352d281 75e204a b055bd3 78a8b6a b055bd3 352d281 768e28c 352d281 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 |
---
language: es
datasets:
- muchocine
widget:
- text: "Una buena película, sin más."
tags:
- sentiment
- analysis
- spanish
---
# Electricidad-base fine-tuned for (Spanish) Sentiment Anlalysis 🎞️👍👎
[Electricidad](https://huggingface.co/mrm8488/electricidad-base-discriminator) base fine-tuned on [muchocine](https://huggingface.co/datasets/muchocine) dataset for Spanish **Sentiment Analysis** downstream task.
## Fast usage with `pipelines` 🚀
```python
# pip install -q transformers
from transformers import AutoModelForSequenceClassification, AutoTokenizer
CHKPT = 'mrm8488/electricidad-base-finetuned-muchocine'
model = AutoModelForSequenceClassification.from_pretrained(CHKPT)
tokenizer = AutoTokenizer.from_pretrained(CHKPT)
from transformers import pipeline
classifier = pipeline('sentiment-analysis', model=model, tokenizer=tokenizer)
# It ranks your comments between 1 and 5 (stars)
classifier('Es una obra mestra. Brillante.')
# [{'label': '5', 'score': 0.9498381614685059}]
classifier('Es una película muy buena.')
# {'label': '4', 'score': 0.9277070760726929}]
classifier('Una buena película, sin más.')
# [{'label': '3', 'score': 0.9768431782722473}]
classifier('Esperaba mucho más.')
# [{'label': '2', 'score': 0.7063605189323425}]
classifier('He tirado el dinero. Una basura. Vergonzoso.')
# [{'label': '1', 'score': 0.8494752049446106}]
``` |