9wimu9 commited on
Commit
9457c30
·
1 Parent(s): 2e02747

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
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=["text"]).launch()
 
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()