Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -30,7 +30,7 @@ def predict(context,question):
|
|
30 |
# dense_duration = (dense_end_time - dense_start_time) * 1000
|
31 |
# dense_answer = dense_predictions['answer']
|
32 |
|
33 |
-
return sparse_answer,sparse_score,sparse_start
|
34 |
|
35 |
md = """This prediction model is designed to answer a question about a given input text--reading comprehension. The model does not just answer questions in general -- it only works from the text that you provide. However, automated reading comprehension can be a valuable task.
|
36 |
|
@@ -61,7 +61,7 @@ iface = gr.Interface(
|
|
61 |
fn=predict,
|
62 |
inputs=[context,question],
|
63 |
# outputs=[sparse_answer,sparse_duration,dense_answer,dense_duration],
|
64 |
-
outputs=[sparse_answer,sparse_score,sparse_start
|
65 |
examples=[[apple_context,apple_question]],
|
66 |
title = "Question & Answer with Sparse BERT using the SQuAD dataset",
|
67 |
description = md,
|
|
|
30 |
# dense_duration = (dense_end_time - dense_start_time) * 1000
|
31 |
# dense_answer = dense_predictions['answer']
|
32 |
|
33 |
+
return sparse_answer,sparse_score,sparse_start #,sparse_duration #,dense_answer,dense_duration
|
34 |
|
35 |
md = """This prediction model is designed to answer a question about a given input text--reading comprehension. The model does not just answer questions in general -- it only works from the text that you provide. However, automated reading comprehension can be a valuable task.
|
36 |
|
|
|
61 |
fn=predict,
|
62 |
inputs=[context,question],
|
63 |
# outputs=[sparse_answer,sparse_duration,dense_answer,dense_duration],
|
64 |
+
outputs=[sparse_answer,sparse_score,sparse_start],
|
65 |
examples=[[apple_context,apple_question]],
|
66 |
title = "Question & Answer with Sparse BERT using the SQuAD dataset",
|
67 |
description = md,
|