Spaces:
Runtime error
Runtime error
Update app.py
Browse files
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]
|