ancebuc commited on
Commit
2ef5d7f
1 Parent(s): 67507f6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
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]