juanpasanper's picture
Update app.py
9caee9d
raw
history blame
545 Bytes
import gradio as gr
def question_answer(context, question):
predictions, raw_outputs = este_si_me_sirvio.predict([{"context": context, "qas": [{"question": question, "id": "0",}],}])
prediccion = predictions[0]['answer'][0]
return prediccion
iface = gr.Interface(fn=question_answer, inputs=["text", "text"], outputs=["text"],
allow_flagging="manual",
flagging_options=["correcto", "incorrecto"],
flagging_dir='flagged',
enable_queue = True)
iface.launch()