Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -316,23 +316,23 @@ with gr.Blocks() as demo:
|
|
316 |
# Crear la estructura para tres columnas de carruseles
|
317 |
gr.Markdown("### Carruseles de Im谩genes")
|
318 |
|
319 |
-
#
|
320 |
image_groups = [
|
321 |
-
[
|
322 |
-
[
|
323 |
-
[
|
324 |
-
[
|
325 |
-
[
|
326 |
-
[
|
327 |
-
[
|
328 |
-
[
|
329 |
-
[
|
330 |
-
[
|
331 |
-
[
|
332 |
-
[
|
333 |
-
[
|
334 |
-
[
|
335 |
-
[
|
336 |
]
|
337 |
|
338 |
# Crear tres columnas de carruseles
|
@@ -343,8 +343,10 @@ with gr.Blocks() as demo:
|
|
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}"): #
|
347 |
-
|
|
|
|
|
348 |
|
349 |
# Bot贸n de descarga de PDF
|
350 |
download_button = gr.File(label="Descargar Informe sobre Administraci贸n de Medicamentos a Reci茅n Nacidos", value="Reporte.pdf")
|
@@ -356,8 +358,6 @@ with gr.Blocks() as demo:
|
|
356 |
chatbot_history = gr.State(value=[])
|
357 |
image_url = gr.State(value=None)
|
358 |
|
359 |
-
|
360 |
-
|
361 |
# Main accordion for categories
|
362 |
with gr.Accordion("Categor铆as de Preguntas", open=True):
|
363 |
|
|
|
316 |
# Crear la estructura para tres columnas de carruseles
|
317 |
gr.Markdown("### Carruseles de Im谩genes")
|
318 |
|
319 |
+
# Crear grupos de im谩genes y descripciones
|
320 |
image_groups = [
|
321 |
+
images[0:3], # Carrusel 1
|
322 |
+
images[3:6], # Carrusel 2
|
323 |
+
images[6:9], # Carrusel 3
|
324 |
+
images[9:12], # Carrusel 4
|
325 |
+
images[12:15], # Carrusel 5
|
326 |
+
images[15:18], # Carrusel 6
|
327 |
+
images[18:21], # Carrusel 7
|
328 |
+
images[21:24], # Carrusel 8
|
329 |
+
images[24:27], # Carrusel 9
|
330 |
+
images[27:30], # Carrusel 10
|
331 |
+
images[30:33], # Carrusel 11
|
332 |
+
images[33:36], # Carrusel 12
|
333 |
+
images[36:39], # Carrusel 13
|
334 |
+
images[39:42], # Carrusel 14
|
335 |
+
images[42:45], # Carrusel 15
|
336 |
]
|
337 |
|
338 |
# Crear tres columnas de carruseles
|
|
|
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}"): # Crear cada carrusel con im谩genes y descripciones
|
347 |
+
for image in images_in_carousel:
|
348 |
+
gr.Image(value=image["path"]) # Mostrar la imagen
|
349 |
+
gr.Markdown(image["description"]) # Mostrar la descripci贸n debajo de la imagen
|
350 |
|
351 |
# Bot贸n de descarga de PDF
|
352 |
download_button = gr.File(label="Descargar Informe sobre Administraci贸n de Medicamentos a Reci茅n Nacidos", value="Reporte.pdf")
|
|
|
358 |
chatbot_history = gr.State(value=[])
|
359 |
image_url = gr.State(value=None)
|
360 |
|
|
|
|
|
361 |
# Main accordion for categories
|
362 |
with gr.Accordion("Categor铆as de Preguntas", open=True):
|
363 |
|