Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -313,24 +313,49 @@ with gr.Blocks() as demo:
|
|
313 |
# Agregar el video al inicio
|
314 |
video = gr.Video(value="video.mp4", label="Video de Introducci贸n")
|
315 |
|
316 |
-
#
|
317 |
-
|
318 |
-
|
319 |
-
|
320 |
-
|
321 |
-
|
322 |
-
|
323 |
-
|
324 |
-
|
325 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
326 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
327 |
download_button = gr.File(label="Descargar Informe sobre Administraci贸n de Medicamentos a Reci茅n Nacidos", value="Reporte.pdf")
|
|
|
|
|
328 |
chatbot_output = gr.Chatbot(label="ChatBot")
|
329 |
chatbot_input = gr.Textbox(label="Tu mensaje")
|
330 |
submit_button = gr.Button("Enviar")
|
331 |
chatbot_history = gr.State(value=[])
|
332 |
image_url = gr.State(value=None)
|
333 |
-
# Agregar un bot贸n para descargar el PDF
|
334 |
|
335 |
|
336 |
# Main accordion for categories
|
|
|
313 |
# Agregar el video al inicio
|
314 |
video = gr.Video(value="video.mp4", label="Video de Introducci贸n")
|
315 |
|
316 |
+
# Crear la estructura para tres columnas de carruseles
|
317 |
+
gr.Markdown("### Carruseles de Im谩genes")
|
318 |
+
|
319 |
+
# Agrupar las im谩genes en sets de 3 para cada carrusel
|
320 |
+
image_groups = [
|
321 |
+
["rId101", "rId105", "rId109"],
|
322 |
+
["rId113", "rId117", "rId121"],
|
323 |
+
["rId125", "rId129", "rId133"],
|
324 |
+
["rId136", "rId139", "rId142"],
|
325 |
+
["rId145", "rId149", "rId153"],
|
326 |
+
["rId157", "rId161", "rId165"],
|
327 |
+
["rId169", "rId173", "rId177"],
|
328 |
+
["rId180", "rId184", "rId187"],
|
329 |
+
["rId192", "rId195", "rId40"],
|
330 |
+
["rId44", "rId47", "rId50"],
|
331 |
+
["rId53", "rId56", "rId59"],
|
332 |
+
["rId63", "rId66", "rId70"],
|
333 |
+
["rId73", "rId76", "rId80"],
|
334 |
+
["rId83", "rId87", "rId90"],
|
335 |
+
["rId94", "rId97", "rId101"]
|
336 |
+
]
|
337 |
|
338 |
+
# Crear tres columnas de carruseles
|
339 |
+
with gr.Row():
|
340 |
+
for group in range(0, len(image_groups), 3): # Iterar en sets de 3 carruseles
|
341 |
+
with gr.Column(scale=1): # Crear columna para cada carrusel
|
342 |
+
with gr.Tabs():
|
343 |
+
for idx in range(3): # Tres carruseles por columna
|
344 |
+
if group + idx < len(image_groups):
|
345 |
+
images_in_carousel = image_groups[group + idx]
|
346 |
+
with gr.Tab(f"Carrusel {group + idx + 1}"): # Permitir tags personalizados
|
347 |
+
with gr.Gallery(images_in_carousel, label=f"Carrusel {group + idx + 1}"):
|
348 |
+
pass
|
349 |
+
|
350 |
+
# Bot贸n de descarga de PDF
|
351 |
download_button = gr.File(label="Descargar Informe sobre Administraci贸n de Medicamentos a Reci茅n Nacidos", value="Reporte.pdf")
|
352 |
+
|
353 |
+
# Chatbot
|
354 |
chatbot_output = gr.Chatbot(label="ChatBot")
|
355 |
chatbot_input = gr.Textbox(label="Tu mensaje")
|
356 |
submit_button = gr.Button("Enviar")
|
357 |
chatbot_history = gr.State(value=[])
|
358 |
image_url = gr.State(value=None)
|
|
|
359 |
|
360 |
|
361 |
# Main accordion for categories
|