ReiderMx commited on
Commit
61fc924
·
verified ·
1 Parent(s): ef78c2c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -15,7 +15,7 @@ def analyze_sentiments(texts):
15
 
16
  positive, negative, neutral = 0, 0, 0
17
  for text in texts:
18
- results = classifier(text, ["positive", "negative", "neutral"], multi_label=True)
19
  mx = max(results['scores'])
20
  ind = results['scores'].index(mx)
21
  result = results['labels'][ind]
 
15
 
16
  positive, negative, neutral = 0, 0, 0
17
  for text in texts:
18
+ results = classifier(text, candidate_labels=["positive", "negative", "neutral"], multi_label=True)
19
  mx = max(results['scores'])
20
  ind = results['scores'].index(mx)
21
  result = results['labels'][ind]