Spaces:
Sleeping
Sleeping
from transformers import pipeline | |
import gradio as gr | |
import torch | |
model = "tclopess/bart_samsum" | |
pipe = pipeline('sentiment-analysis', model=model) | |
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 de entrada:' | |
) |