Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -438,28 +438,28 @@ with gr.Blocks(delete_cache=(600, 600), js=js_func) as demo:
|
|
438 |
is_multiimage = gr.State(False)
|
439 |
output_buf = gr.State()
|
440 |
|
441 |
-
|
442 |
-
|
443 |
-
|
444 |
-
|
445 |
-
|
446 |
-
|
447 |
-
|
448 |
-
|
449 |
-
|
450 |
-
|
451 |
-
|
452 |
-
|
453 |
-
|
454 |
-
|
455 |
-
|
456 |
-
|
457 |
-
|
458 |
-
|
459 |
-
|
460 |
-
|
461 |
-
|
462 |
-
|
463 |
|
464 |
# Handlers
|
465 |
demo.load(start_session)
|
|
|
438 |
is_multiimage = gr.State(False)
|
439 |
output_buf = gr.State()
|
440 |
|
441 |
+
Example images at the bottom of the page
|
442 |
+
with gr.Row() as single_image_example:
|
443 |
+
examples = gr.Examples(
|
444 |
+
examples=[
|
445 |
+
f'assets/example_image/{image}'
|
446 |
+
for image in os.listdir("assets/example_image")
|
447 |
+
],
|
448 |
+
inputs=[image_prompt],
|
449 |
+
fn=preprocess_image,
|
450 |
+
outputs=[image_prompt],
|
451 |
+
run_on_click=True,
|
452 |
+
examples_per_page=64,
|
453 |
+
)
|
454 |
+
with gr.Row(visible=False) as multiimage_example:
|
455 |
+
examples_multi = gr.Examples(
|
456 |
+
examples=prepare_multi_example(),
|
457 |
+
inputs=[image_prompt],
|
458 |
+
fn=split_image,
|
459 |
+
outputs=[multiimage_prompt],
|
460 |
+
run_on_click=True,
|
461 |
+
examples_per_page=8,
|
462 |
+
)
|
463 |
|
464 |
# Handlers
|
465 |
demo.load(start_session)
|