shubhamjaiswar commited on
Commit
067ba2a
·
1 Parent(s): 5bd9000

Update app.py

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