Spaces:
Runtime error
Runtime error
Alberto Carmona
commited on
Commit
·
5e405b4
1
Parent(s):
0209bf9
Update the layout
Browse files
app.py
CHANGED
@@ -13,13 +13,13 @@ with gr.Blocks() as demo:
|
|
13 |
inp_url = gr.Textbox(placeholder="URL",
|
14 |
show_label=False)
|
15 |
btn_extract_text = gr.Button("Extraer texto")
|
16 |
-
out_url_text = gr.Textbox(label="Texto extraído
|
17 |
btn_extract_text.click(fn=update, inputs=inp_url, outputs=out_url_text)
|
18 |
|
19 |
# Summary section
|
20 |
gr.Markdown("Puede obtener un resumen del texto extraído.")
|
21 |
btn_summarize = gr.Button("Elaborar resumen")
|
22 |
-
out_summary = gr.Textbox()
|
23 |
btn_summarize.click(fn=update, inputs=out_url_text, outputs=out_summary)
|
24 |
|
25 |
# Question generation section
|
@@ -28,17 +28,18 @@ with gr.Blocks() as demo:
|
|
28 |
with gr.Row():
|
29 |
with gr.Column():
|
30 |
btn_question_gen = gr.Button("Pregúntame algo sobre el contenido")
|
31 |
-
out_question_gen = gr.Textbox()
|
32 |
btn_question_gen.click(fn=update, inputs=out_url_text,
|
33 |
outputs=out_question_gen)
|
34 |
with gr.Column():
|
35 |
btn_question_gen = gr.Button("Muestra contexto de la respuesta")
|
36 |
-
out_question_answer = gr.Textbox()
|
37 |
btn_question_gen.click(fn=update, outputs=out_question_answer)
|
38 |
|
39 |
# Question and answering
|
40 |
gr.Markdown("Haz preguntas sobre el contenido...")
|
41 |
-
inp_qna = gr.Textbox(placeholder="Escriba su pregunta aquí"
|
|
|
42 |
btn_qna = gr.Button("Responder")
|
43 |
out_qna = gr.Textbox()
|
44 |
btn_qna.click(fn=update, inputs=inp_qna, outputs=out_qna)
|
|
|
13 |
inp_url = gr.Textbox(placeholder="URL",
|
14 |
show_label=False)
|
15 |
btn_extract_text = gr.Button("Extraer texto")
|
16 |
+
out_url_text = gr.Textbox(label="Texto extraído")
|
17 |
btn_extract_text.click(fn=update, inputs=inp_url, outputs=out_url_text)
|
18 |
|
19 |
# Summary section
|
20 |
gr.Markdown("Puede obtener un resumen del texto extraído.")
|
21 |
btn_summarize = gr.Button("Elaborar resumen")
|
22 |
+
out_summary = gr.Textbox(label="Resumen")
|
23 |
btn_summarize.click(fn=update, inputs=out_url_text, outputs=out_summary)
|
24 |
|
25 |
# Question generation section
|
|
|
28 |
with gr.Row():
|
29 |
with gr.Column():
|
30 |
btn_question_gen = gr.Button("Pregúntame algo sobre el contenido")
|
31 |
+
out_question_gen = gr.Textbox(show_label=False)
|
32 |
btn_question_gen.click(fn=update, inputs=out_url_text,
|
33 |
outputs=out_question_gen)
|
34 |
with gr.Column():
|
35 |
btn_question_gen = gr.Button("Muestra contexto de la respuesta")
|
36 |
+
out_question_answer = gr.Textbox(show_label=False)
|
37 |
btn_question_gen.click(fn=update, outputs=out_question_answer)
|
38 |
|
39 |
# Question and answering
|
40 |
gr.Markdown("Haz preguntas sobre el contenido...")
|
41 |
+
inp_qna = gr.Textbox(placeholder="Escriba su pregunta aquí",
|
42 |
+
show_label=False)
|
43 |
btn_qna = gr.Button("Responder")
|
44 |
out_qna = gr.Textbox()
|
45 |
btn_qna.click(fn=update, inputs=inp_qna, outputs=out_qna)
|