Spaces:
Sleeping
Sleeping
| from transformers import pipeline | |
| import gradio as gr | |
| import torch | |
| pipe = pipeline('sentiment-analysis') | |
| def get_sentiment(input_text): | |
| return pipe(input_text) | |
| iface = gr.Interface(fn=get_sentiment, | |
| inputs='text', | |
| outputs=['text'], | |
| title='Sentiment Analysis', | |
| description='Obtenha o sentimento do texto digitado' | |
| ) | |
| iface.launch(inline=False) | |