Spaces:
Runtime error
Runtime error
storresbusquets
commited on
Commit
•
3714046
1
Parent(s):
8c47083
Update app.py
Browse files
app.py
CHANGED
@@ -155,7 +155,7 @@ class GradioInference:
|
|
155 |
}
|
156 |
|
157 |
# Sentiment label
|
158 |
-
label = self.classifier(
|
159 |
|
160 |
# Format the label with emojis
|
161 |
formatted_sentiment = sentiment_emojis.get(label, label)
|
@@ -168,7 +168,7 @@ class GradioInference:
|
|
168 |
# WordCloud image to display
|
169 |
wordcloud_image = wordcloud.to_image()
|
170 |
|
171 |
-
if lang == "english":
|
172 |
return (
|
173 |
results["text"],
|
174 |
summary2,
|
|
|
155 |
}
|
156 |
|
157 |
# Sentiment label
|
158 |
+
label = self.classifier(summary2)[0]["label"]
|
159 |
|
160 |
# Format the label with emojis
|
161 |
formatted_sentiment = sentiment_emojis.get(label, label)
|
|
|
168 |
# WordCloud image to display
|
169 |
wordcloud_image = wordcloud.to_image()
|
170 |
|
171 |
+
if lang == "english" or lang == "none":
|
172 |
return (
|
173 |
results["text"],
|
174 |
summary2,
|