Spaces:
Sleeping
Sleeping
Update app.py
Browse files
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'], 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()
|
|
|
13 |
|
14 |
def answer_question(question, context):
|
15 |
answer = question_answerer(question=question, context=context)
|
16 |
+
return answer['answer'], answer['score'], answer['start'], answer['end']
|
17 |
|
18 |
|
19 |
iface = gr.Interface(
|
20 |
fn=answer_question,
|
21 |
inputs=["text", "text"],
|
22 |
+
outputs=["text", "float", "int", "int"],
|
23 |
title="Hugging Face Question Answering"
|
24 |
)
|
25 |
iface.launch()
|