Upload app.py
Browse files
app.py
CHANGED
@@ -72,21 +72,22 @@ with gr.Blocks(theme='lone17/kotaemon') as demo:
|
|
72 |
lines=2
|
73 |
)
|
74 |
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
|
|
84 |
|
85 |
# Columna derecha
|
86 |
with gr.Column(scale=1):
|
87 |
imagen_mostrada = gr.Image(
|
88 |
label="🖼 Imagen seleccionada o subida",
|
89 |
-
type="numpy",
|
90 |
height=256
|
91 |
)
|
92 |
|
@@ -170,4 +171,4 @@ with gr.Blocks(theme='lone17/kotaemon') as demo:
|
|
170 |
btn_procesar.click(fn=responder, inputs=[imagen_mostrada, pregunta], outputs=respuesta)
|
171 |
|
172 |
if __name__ == "__main__":
|
173 |
-
demo.launch()
|
|
|
72 |
lines=2
|
73 |
)
|
74 |
|
75 |
+
# Asignamos elem_id al Gallery directamente
|
76 |
+
galeria = gr.Gallery(
|
77 |
+
label="📁 Elige una imagen de ejemplo",
|
78 |
+
value=[img for img, _ in example_imgs],
|
79 |
+
columns=2,
|
80 |
+
height=None, # el CSS controla altura
|
81 |
+
allow_preview=True,
|
82 |
+
show_label=True,
|
83 |
+
elem_id="galeria-scroll"
|
84 |
+
)
|
85 |
|
86 |
# Columna derecha
|
87 |
with gr.Column(scale=1):
|
88 |
imagen_mostrada = gr.Image(
|
89 |
label="🖼 Imagen seleccionada o subida",
|
90 |
+
type="numpy",
|
91 |
height=256
|
92 |
)
|
93 |
|
|
|
171 |
btn_procesar.click(fn=responder, inputs=[imagen_mostrada, pregunta], outputs=respuesta)
|
172 |
|
173 |
if __name__ == "__main__":
|
174 |
+
demo.launch()
|