mrm8488 commited on
Commit
352d281
1 Parent(s): 27d015a

Create README.md

Browse files
Files changed (1) hide show
  1. README.md +40 -0
README.md ADDED
@@ -0,0 +1,40 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language: es
3
+ datasets:
4
+ - muchocinewidget:
5
+ - text: "Una buena película, sin más."
6
+
7
+ ---
8
+ # Electricidad-base fine-tuned for (Spanish) Sentiment Anlalysis 🎞️👍👎
9
+
10
+
11
+ [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.
12
+ ## Fast usage with `pipelines` 🚀
13
+
14
+ ```python
15
+ # pip install -q transformers
16
+
17
+ from transformers import AutoModelForSequenceClassification, AutoTokenizer
18
+
19
+ CHKPT = 'mrm8488/electricidad-base-finetuned-muchocine'
20
+ model = AutoModelForSequenceClassification.from_pretrained(CHKPT)
21
+ tokenizer = AutoTokenizer.from_pretrained(CHKPT)
22
+
23
+ from transformers import pipeline
24
+ classifier = pipeline('sentiment-analysis', model=model, tokenizer=tokenizer)
25
+
26
+ classifier('Es una obra mestra. Brillante.')
27
+ # [{'label': '5', 'score': 0.9498381614685059}]
28
+
29
+ classifier('Es una película muy buena.')
30
+ # {'label': '4', 'score': 0.9277070760726929}]
31
+
32
+ classifier('Una buena película, sin más.')
33
+ # [{'label': '3', 'score': 0.9768431782722473}]
34
+
35
+ classifier('Esperaba mucho más.')
36
+ # [{'label': '2', 'score': 0.7063605189323425}]
37
+
38
+ classifier('He tirado el dinero. Una basura. Vergonzoso.')
39
+ # [{'label': '1', 'score': 0.8494752049446106}]
40
+ ```