Tirath5504's picture
Update app.py
97cbec3 verified
raw
history blame contribute delete
330 Bytes
import gradio as gr
from vaderSentiment.vaderSentiment import SentimentIntensityAnalyzer
analyzer = SentimentIntensityAnalyzer()
def analyze_sentiment(text):
sentiment = analyzer.polarity_scores(text)
return sentiment
iface = gr.Interface(fn=analyze_sentiment, inputs="text", outputs=["json"], live=True)
iface.launch()