Spaces:
Sleeping
Sleeping
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() |