Spaces:
Sleeping
Sleeping
File size: 478 Bytes
b1a95cf e1af253 a41fd91 e1af253 |
1 2 3 4 5 6 7 8 9 10 11 |
from transformers import AutoModelForQuestionAnswering, AutoTokenizer, pipeline
import gradio as grad
import ast
mdl_name = "lxyuan/distilbert-base-multilingual-cased-sentiments-student"
my_pipeline = pipeline(model=mdl_name, return_all_scores=True)
def get_text(text):
response = my_pipeline(text)
return response
grad.Interface(get_text, inputs=grad.Textbox(lines=2, placeholder="Insira aqui a sentença a ser analisada..."),
outputs="text").launch() |