Spaces:
Sleeping
Sleeping
File size: 470 Bytes
020b4ec f74d5e4 020b4ec 3caf6ce 020b4ec |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
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:'
) |