import gradio as gr #from QA_Pipeline import * from QA_Tensorflow import * question = "What is Pragyan?" context = "Chandrayaan-3 is the third and most recent lunar Indian Space Research exploration mission under the Chandrayaan programme of ISRO. It consists of a lander named Vikram and a rover named Pragyan similar to Chandrayaan-2. Its propulsion module behaves like a communication relay satellite." title = "Extractive question answering" description = """ """ question_box = gr.Textbox(label="Question:", placeholder="What is Pragyan?", lines=2) context_box = gr.Textbox(label="Context", placeholder=context, lines=10) demo = gr.Interface(fn=question_answering_tf, inputs=[question_box, context_box], outputs="text", title=title, description=description) demo.launch()