Spaces:
Sleeping
Sleeping
| import gradio as gr | |
| from transformers import pipeline | |
| classifier = pipeline("sentiment-analysis") | |
| def predict_sentiment(text): | |
| result = classifier(text) | |
| return result[0]['label'] | |
| iface = gr.Interface(fn=predict_sentiment, inputs="text", outputs="text", title = 'Sentiment Analysis') | |
| iface.launch() |