Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse filesAdded scrollable gallery
app.py
CHANGED
@@ -279,9 +279,29 @@ with gr.Blocks(title="DiT Diffusion Model Generator", theme=gr.themes.Soft()) as
|
|
279 |
progress_bar = gr.Progress(track_tqdm=True)
|
280 |
|
281 |
with gr.Column(scale=2):
|
282 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
283 |
error_message = gr.Textbox(label="Error", visible=False, max_lines=3, container=True, elem_id="error_box")
|
284 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
285 |
dit_size.change(update_sample_slider, inputs=[dit_size],outputs=[num_samples])
|
286 |
|
287 |
# Seed reset button functionality
|
|
|
279 |
progress_bar = gr.Progress(track_tqdm=True)
|
280 |
|
281 |
with gr.Column(scale=2):
|
282 |
+
with gr.Box(elem_id="gallery_container"):
|
283 |
+
output_gallery = gr.Gallery(
|
284 |
+
label="Generated Images",
|
285 |
+
columns=4,
|
286 |
+
rows=3,
|
287 |
+
object_fit="contain",
|
288 |
+
elem_id="scrollable_gallery"
|
289 |
+
)
|
290 |
error_message = gr.Textbox(label="Error", visible=False, max_lines=3, container=True, elem_id="error_box")
|
291 |
|
292 |
+
gr.HTML("""
|
293 |
+
<style>
|
294 |
+
#gallery_container {
|
295 |
+
height: 600px;
|
296 |
+
overflow-y: auto;
|
297 |
+
padding-right: 10px;
|
298 |
+
}
|
299 |
+
#scrollable_gallery {
|
300 |
+
min-height: 100%
|
301 |
+
}
|
302 |
+
</style>
|
303 |
+
""")
|
304 |
+
|
305 |
dit_size.change(update_sample_slider, inputs=[dit_size],outputs=[num_samples])
|
306 |
|
307 |
# Seed reset button functionality
|