Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -18,6 +18,6 @@ def question_answer(context, question):
|
|
18 |
}
|
19 |
]
|
20 |
answers, probabilities = model.predict(to_predict)
|
21 |
-
return answers[0]['answer'][0]
|
22 |
|
23 |
-
gr.Interface(fn=question_answer, inputs=["text", "text"], outputs=["
|
|
|
18 |
}
|
19 |
]
|
20 |
answers, probabilities = model.predict(to_predict)
|
21 |
+
return answers[0]['answer'][0],probabilities[0]['probability'][0]
|
22 |
|
23 |
+
gr.Interface(fn=question_answer, inputs=["text", "text"], outputs=[gr.outputs.Textbox(label="Answer"), gr.outputs.Textbox(label="Probability")]).launch()
|