Spaces:
Sleeping
Sleeping
File size: 265 Bytes
b171d93 | 1 2 3 4 5 6 7 8 | import gradio as gr
from textblob import TextBlob
def sentiment_analysis(text):
p = TextBlob(text).sentiment.polarity
return "Positive" if p > 0 else "Negative" if p < 0 else "Neutral"
gr.Interface(sentiment_analysis,"text", "text").launch(ssr_mode=False) |