Spaces:
Runtime error
Runtime error
| import gradio as gr | |
| from transformers import pipeline | |
| david = pipeline('sentiment-analysis') | |
| def get_senti(input_text): | |
| result = david(input_text) | |
| return result[0]["label"] | |
| iface=gr.Interface(fn=get_senti, | |
| inputs="text", | |
| outputs=['text'], | |
| title="David's Sentiment Analysis" ) | |
| iface.launch(inline=False) |