alexvaroz's picture
Update app.py
ec7faea
raw
history blame
427 Bytes
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()