Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -46,12 +46,19 @@ with gr.Blocks() as demo:
|
|
46 |
with gr.Row():
|
47 |
inputs = gr.Textbox(label = 'Enter prompt to search Lexica.art')
|
48 |
#gr.Slider(label='Number of images ', minimum = 4, maximum = 20, step = 1, value = 4)]
|
49 |
-
text_button = gr.Button("Retrieve Images")
|
50 |
i = gr.Image()
|
51 |
with gr.Tabs():
|
52 |
-
|
53 |
-
|
54 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
55 |
|
56 |
#outputs.select(image_click, outputs, i, _js="(x) => x.splice(0,x.length)")
|
57 |
outputs.select(image_click, outputs, i,)
|
|
|
46 |
with gr.Row():
|
47 |
inputs = gr.Textbox(label = 'Enter prompt to search Lexica.art')
|
48 |
#gr.Slider(label='Number of images ', minimum = 4, maximum = 20, step = 1, value = 4)]
|
49 |
+
text_button = gr.Button("Retrieve Images").style(full_width=False)
|
50 |
i = gr.Image()
|
51 |
with gr.Tabs():
|
52 |
+
#### Try to click on a image in the gallery, and the gallery order will changed
|
53 |
+
with gr.Column():
|
54 |
+
title = gr.Markdown(
|
55 |
+
value="### Click on a Image in the gallery to select it, and the grid order will changed",
|
56 |
+
visible=True,
|
57 |
+
elem_id="selected_image",
|
58 |
+
)
|
59 |
+
outputs = gr.Gallery(lable='Output gallery').style(grid=3,height=768,
|
60 |
+
allow_preview=False, label = "retrieve Images")
|
61 |
+
#gr.Dataframe(label='prompts for corresponding images')]
|
62 |
|
63 |
#outputs.select(image_click, outputs, i, _js="(x) => x.splice(0,x.length)")
|
64 |
outputs.select(image_click, outputs, i,)
|