Spaces:
Runtime error
Runtime error
Jeffrey Rathgeber Jr
commited on
textblob test
Browse files
app.py
CHANGED
@@ -19,9 +19,9 @@ st.write('According to Pipeline, input text is ', preds[0]['label'], ' with a co
|
|
19 |
# textblob
|
20 |
polarity = TextBlob(textIn).sentiment.polarity
|
21 |
sentiment = TextBlob(textIn).sentiment
|
22 |
-
if
|
23 |
sentiment = 'Negative'
|
24 |
-
elif
|
25 |
sentiment = 'Neutral'
|
26 |
else:
|
27 |
sentiment = 'Positive'
|
|
|
19 |
# textblob
|
20 |
polarity = TextBlob(textIn).sentiment.polarity
|
21 |
sentiment = TextBlob(textIn).sentiment
|
22 |
+
if polarity < 0:
|
23 |
sentiment = 'Negative'
|
24 |
+
elif polarity == 0:
|
25 |
sentiment = 'Neutral'
|
26 |
else:
|
27 |
sentiment = 'Positive'
|