shubhamjaiswar commited on
Commit
b962413
·
1 Parent(s): 0b2b7d7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -5,9 +5,9 @@ nltk.download('vader_lexicon')
5
  def sentiment_analysis(sentiment_text):
6
  score = SentimentIntensityAnalyzer().polarity_scores(sentiment_text)
7
  print(score)
8
- if score['neg']>score['pos']:
9
  return "Negative Feedback"
10
- elif score['neg']<score['pos']:
11
  return "Positive Feedback"
12
  else:
13
  return "Neutral Feedback"
 
5
  def sentiment_analysis(sentiment_text):
6
  score = SentimentIntensityAnalyzer().polarity_scores(sentiment_text)
7
  print(score)
8
+ if score['compound']<(-0.2):
9
  return "Negative Feedback"
10
+ elif score['compound']>0.2:
11
  return "Positive Feedback"
12
  else:
13
  return "Neutral Feedback"