Spaces:
Runtime error
Runtime error
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() | |