Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -82,7 +82,7 @@ with gr.Blocks(css=css) as demo:
|
|
82 |
with gr.Column():
|
83 |
# ip_adapter_images = gr.Gallery(label="Input Images", elem_id="image-gallery").style(grid=[2], preview=True)
|
84 |
# ip_adapter_images = gr.Gallery(label="Input Images", elem_id="image-gallery", show_label=True)#.style(grid=[2])
|
85 |
-
ip_adapter_images = gr.Gallery(columns=4, interactive=True, label="Input Images")
|
86 |
|
87 |
files = gr.File(
|
88 |
label="Input Image/s",
|
@@ -90,6 +90,8 @@ with gr.Blocks(css=css) as demo:
|
|
90 |
file_count="multiple"
|
91 |
)
|
92 |
uploaded_files = gr.Gallery(label="Your images", visible=False, columns=5, rows=1, height=200)
|
|
|
|
|
93 |
|
94 |
|
95 |
ip_adapter_scale = gr.Slider(
|
@@ -174,8 +176,8 @@ with gr.Blocks(css=css) as demo:
|
|
174 |
step=1,
|
175 |
value=25,
|
176 |
)
|
177 |
-
files.upload(fn=swap_to_gallery, inputs=files, outputs=[uploaded_files, files])
|
178 |
-
|
179 |
|
180 |
|
181 |
# gr.Examples(
|
|
|
82 |
with gr.Column():
|
83 |
# ip_adapter_images = gr.Gallery(label="Input Images", elem_id="image-gallery").style(grid=[2], preview=True)
|
84 |
# ip_adapter_images = gr.Gallery(label="Input Images", elem_id="image-gallery", show_label=True)#.style(grid=[2])
|
85 |
+
# ip_adapter_images = gr.Gallery(columns=4, interactive=True, label="Input Images")
|
86 |
|
87 |
files = gr.File(
|
88 |
label="Input Image/s",
|
|
|
90 |
file_count="multiple"
|
91 |
)
|
92 |
uploaded_files = gr.Gallery(label="Your images", visible=False, columns=5, rows=1, height=200)
|
93 |
+
with gr.Column(visible=False) as clear_button:
|
94 |
+
remove_and_reupload = gr.ClearButton(value="Remove and upload new ones", components=files, size="sm")
|
95 |
|
96 |
|
97 |
ip_adapter_scale = gr.Slider(
|
|
|
176 |
step=1,
|
177 |
value=25,
|
178 |
)
|
179 |
+
files.upload(fn=swap_to_gallery, inputs=files, outputs=[uploaded_files, clear_button, files])
|
180 |
+
remove_and_reupload.click(fn=remove_back_to_files, outputs=[uploaded_files, clear_button, files])
|
181 |
|
182 |
|
183 |
# gr.Examples(
|