Jeffrey Rathgeber Jr commited on
Commit
23ec77b
·
unverified ·
1 Parent(s): ea9f08f

textblob test

Browse files
Files changed (1) hide show
  1. app.py +2 -2
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 score < 0:
23
  sentiment = 'Negative'
24
- elif score == 0:
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'