sentivity commited on
Commit
80aaab0
·
verified ·
1 Parent(s): 583f11d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -60,12 +60,12 @@ def predict_sentiment(text):
60
  ranking = ranking[::-1]
61
  negative_index = None
62
  for i in range(scores.shape[0]):
63
- if config.id2label[ranking[i]] == 'negative':
64
  negative_index = ranking[i]
65
  break
66
  negative_score = scores[negative_index]
67
 
68
- return negative_score
69
 
70
 
71
 
 
60
  ranking = ranking[::-1]
61
  negative_index = None
62
  for i in range(scores.shape[0]):
63
+ if config.id2label[ranking[i]] == 'positive':
64
  negative_index = ranking[i]
65
  break
66
  negative_score = scores[negative_index]
67
 
68
+ return float(negative_score)*100
69
 
70
 
71