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