Spaces:
Runtime error
Runtime error
| from transformers import pipeline | |
| import gradio as gr | |
| sentiment = pipeline('sentiment-analysis') | |
| def get_sentiment(input_text): | |
| return sentiment(input_text) | |
| result = get_sentiment("The movie was bad") | |
| iface = gr.Interface(fn = get_sentiment, inputs= 'text', outputs = ['text'], title = 'Sentiment Analysis') | |
| iface.launch(inline = False, share= True) |