Update app.py
Browse files
app.py
CHANGED
|
@@ -11,9 +11,16 @@ qa2 = pipeline("question-answering", model="MarcBrun/ixambert-finetuned-squad-eu
|
|
| 11 |
qa3 = pipeline("question-answering", model="MarcBrun/ixambert-finetuned-squad-eu-en")
|
| 12 |
|
| 13 |
def answer_question1(question, context):
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 17 |
return answer["answer"]
|
| 18 |
|
| 19 |
iface1 = gr.Interface(fn=answer_question1, inputs=[gr.inputs.Textbox(),gr.inputs.Textbox()], outputs=gr.outputs.Textbox(label="ixambert-squad"), capture_session=True)
|
|
|
|
| 11 |
qa3 = pipeline("question-answering", model="MarcBrun/ixambert-finetuned-squad-eu-en")
|
| 12 |
|
| 13 |
def answer_question1(question, context):
|
| 14 |
+
answer = qa1(question=question, context=context)
|
| 15 |
+
return answer["answer"]
|
| 16 |
+
|
| 17 |
+
def answer_question2(question, context):
|
| 18 |
+
answer = qa2(question=question, context=context)
|
| 19 |
+
return answer["answer"]
|
| 20 |
+
|
| 21 |
+
|
| 22 |
+
def answer_question3(question, context):
|
| 23 |
+
answer = qa3(question=question, context=context)
|
| 24 |
return answer["answer"]
|
| 25 |
|
| 26 |
iface1 = gr.Interface(fn=answer_question1, inputs=[gr.inputs.Textbox(),gr.inputs.Textbox()], outputs=gr.outputs.Textbox(label="ixambert-squad"), capture_session=True)
|