bloodfire / app.py
Leotis
format doc
eefbd1f
raw
history blame contribute delete
No virus
365 Bytes
import gradio as gr
from inference import Question_and_Answer_System
qa = Question_and_Answer_System()
def ask_question(question):
prediction = qa.answer_question(question)
answers = prediction["answers"]
answer = prediction["answers"][0].answer
return answer
iface = gr.Interface(fn=ask_question, inputs="text", outputs="text")
iface.launch()