RakshakRit / README.md
shubhamjaiswar's picture
Create README.md
56d146b
|
raw
history blame
476 Bytes

import gradio as gr from nltk.sentiment.vader import SentimentIntensityAnalyzer

def sentiment_analysis(sentiment_text): score = SentimentIntensityAnalyzer().polarity_scores(sentiment_text) if score['neg']>score['pos']: return "Negative Feedback" elif score['neg']<score['pos']: return "Positive Feedback" else: return "Neutral Feedback"

iface = gr.Interface(fn = sentiment_analysis , inputs=['text'] , outputs=['text']) iface.launch()