Spaces:
Sleeping
Sleeping
File size: 427 Bytes
b1a95cf ec7faea |
1 2 3 4 5 6 7 8 9 |
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=["Digite a sentença que queira avaliar:"], outputs="Resposta").launch() |