Spaces:
Sleeping
Sleeping
Commit
·
ebad252
1
Parent(s):
eea4a55
Update app.py
Browse files
app.py
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
import gradio as gr
|
2 |
from nltk.sentiment.vader import SentimentIntensityAnalyzer
|
3 |
-
|
4 |
-
|
5 |
def sentiment_analysis(sentiment_text):
|
6 |
score = SentimentIntensityAnalyzer().polarity_scores(sentiment_text)
|
7 |
if score['neg']>score['pos']:
|
|
|
1 |
import gradio as gr
|
2 |
from nltk.sentiment.vader import SentimentIntensityAnalyzer
|
3 |
+
import nltk
|
4 |
+
nltk.download('vader_lexicon')
|
5 |
def sentiment_analysis(sentiment_text):
|
6 |
score = SentimentIntensityAnalyzer().polarity_scores(sentiment_text)
|
7 |
if score['neg']>score['pos']:
|