Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -3,7 +3,7 @@ from transformers import pipeline
|
|
3 |
|
4 |
def greet(tweet):
|
5 |
classifier = pipeline('text-classification', model='ancebuc/tweet-eval-sentiment')
|
6 |
-
label = classifier(tweet)['label']
|
7 |
|
8 |
labels = {'LABEL_0': 'Negativo :)', 'LABEL_1': 'Neutro :/', 'LABEL_2': 'Positivo :)'}
|
9 |
return labels[label]
|
|
|
3 |
|
4 |
def greet(tweet):
|
5 |
classifier = pipeline('text-classification', model='ancebuc/tweet-eval-sentiment')
|
6 |
+
label = classifier(tweet)[0]['label']
|
7 |
|
8 |
labels = {'LABEL_0': 'Negativo :)', 'LABEL_1': 'Neutro :/', 'LABEL_2': 'Positivo :)'}
|
9 |
return labels[label]
|