Update app.py
Browse files
app.py
CHANGED
@@ -22,10 +22,10 @@ def answer_3(question, context):
|
|
22 |
answer = qa3(question=question, context=context)
|
23 |
return answer["answer"]
|
24 |
|
25 |
-
iface1 = gr.Interface(fn=answer_1, inputs=[gr.inputs.Textbox(),gr.inputs.Textbox()], outputs=gr.outputs.Textbox(label="
|
26 |
|
27 |
-
iface2 = gr.Interface(fn=answer_2, inputs=[gr.inputs.Textbox(),gr.inputs.Textbox()], outputs=gr.outputs.Textbox(label="
|
28 |
|
29 |
-
iface3 = gr.Interface(fn=answer_3, inputs=[gr.inputs.Textbox(),gr.inputs.Textbox()], outputs=gr.outputs.Textbox(label="
|
30 |
|
31 |
Parallel(iface1, iface2, iface3, inputs=[gr.inputs.Textbox(lines=1, default=question, placeholder="Question Here...", label="Question"),gr.inputs.Textbox(lines=7, default=context, placeholder="Context Here...", label="Context")], title = "Question Answering in Basque", description="This demo compares the outputs of three QA models based on IXAmBERT. Each has been trained on different data: one on SQuADv1.1, another on an experimental version of SQuAD in Basque, and the last on both those datasets.").launch()
|
|
|
22 |
answer = qa3(question=question, context=context)
|
23 |
return answer["answer"]
|
24 |
|
25 |
+
iface1 = gr.Interface(fn=answer_1, inputs=[gr.inputs.Textbox(),gr.inputs.Textbox()], outputs=gr.outputs.Textbox(label="SQuADv1.1"))
|
26 |
|
27 |
+
iface2 = gr.Interface(fn=answer_2, inputs=[gr.inputs.Textbox(),gr.inputs.Textbox()], outputs=gr.outputs.Textbox(label="SQuAD-eu"))
|
28 |
|
29 |
+
iface3 = gr.Interface(fn=answer_3, inputs=[gr.inputs.Textbox(),gr.inputs.Textbox()], outputs=gr.outputs.Textbox(label="SQuADv1.1 + SQuAD-eu"))
|
30 |
|
31 |
Parallel(iface1, iface2, iface3, inputs=[gr.inputs.Textbox(lines=1, default=question, placeholder="Question Here...", label="Question"),gr.inputs.Textbox(lines=7, default=context, placeholder="Context Here...", label="Context")], title = "Question Answering in Basque", description="This demo compares the outputs of three QA models based on IXAmBERT. Each has been trained on different data: one on SQuADv1.1, another on an experimental version of SQuAD in Basque, and the last on both those datasets.").launch()
|