kimhung0011 commited on
Commit
b55d981
·
verified ·
1 Parent(s): 11338f1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -13,13 +13,13 @@ question_answerer = pipeline("question-answering", model=model_checkpoint)
13
 
14
  def answer_question(question, context):
15
  answer = question_answerer(question=question, context=context)
16
- return answer['answer']
17
 
18
 
19
  iface = gr.Interface(
20
  fn=answer_question,
21
  inputs=["text", "text"],
22
- outputs="text",
23
  title="Hugging Face Question Answering"
24
  )
25
  iface.launch()
 
13
 
14
  def answer_question(question, context):
15
  answer = question_answerer(question=question, context=context)
16
+ return answer['answer'], answer['score']
17
 
18
 
19
  iface = gr.Interface(
20
  fn=answer_question,
21
  inputs=["text", "text"],
22
+ outputs=["text", "float"],
23
  title="Hugging Face Question Answering"
24
  )
25
  iface.launch()