Spaces:
Runtime error
Runtime error
Include the context in the case of the button to answer a question
Browse files
app.py
CHANGED
|
@@ -44,7 +44,8 @@ with gr.Blocks() as demo:
|
|
| 44 |
with gr.Column():
|
| 45 |
btn_question_gen = gr.Button("Muestra contexto de la respuesta")
|
| 46 |
out_question_answer = gr.Textbox(show_label=False)
|
| 47 |
-
btn_question_gen.click(fn=get_answer_context,
|
|
|
|
| 48 |
|
| 49 |
# Question and answering
|
| 50 |
gr.Markdown("## Pregunta sobre el texto")
|
|
@@ -54,6 +55,7 @@ with gr.Blocks() as demo:
|
|
| 54 |
show_label=False)
|
| 55 |
btn_qna = gr.Button("Responder")
|
| 56 |
out_qna = gr.Textbox(show_label=False)
|
| 57 |
-
btn_qna.click(fn=answer_question, inputs=
|
|
|
|
| 58 |
|
| 59 |
demo.launch()
|
|
|
|
| 44 |
with gr.Column():
|
| 45 |
btn_question_gen = gr.Button("Muestra contexto de la respuesta")
|
| 46 |
out_question_answer = gr.Textbox(show_label=False)
|
| 47 |
+
btn_question_gen.click(fn=get_answer_context,
|
| 48 |
+
outputs=out_question_answer)
|
| 49 |
|
| 50 |
# Question and answering
|
| 51 |
gr.Markdown("## Pregunta sobre el texto")
|
|
|
|
| 55 |
show_label=False)
|
| 56 |
btn_qna = gr.Button("Responder")
|
| 57 |
out_qna = gr.Textbox(show_label=False)
|
| 58 |
+
btn_qna.click(fn=answer_question, inputs=[
|
| 59 |
+
out_url_text, inp_qna], outputs=out_qna)
|
| 60 |
|
| 61 |
demo.launch()
|