shubhamjaiswar
commited on
Commit
•
2e1afe5
1
Parent(s):
56d146b
Update README.md
Browse files
README.md
CHANGED
@@ -1,14 +0,0 @@
|
|
1 |
-
import gradio as gr
|
2 |
-
from nltk.sentiment.vader import SentimentIntensityAnalyzer
|
3 |
-
|
4 |
-
def sentiment_analysis(sentiment_text):
|
5 |
-
score = SentimentIntensityAnalyzer().polarity_scores(sentiment_text)
|
6 |
-
if score['neg']>score['pos']:
|
7 |
-
return "Negative Feedback"
|
8 |
-
elif score['neg']<score['pos']:
|
9 |
-
return "Positive Feedback"
|
10 |
-
else:
|
11 |
-
return "Neutral Feedback"
|
12 |
-
|
13 |
-
iface = gr.Interface(fn = sentiment_analysis , inputs=['text'] , outputs=['text'])
|
14 |
-
iface.launch()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|