Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -353,8 +353,7 @@ with gr.Blocks(css="style.css") as demo:
|
|
353 |
json_input = gr.TextArea(label="Edit/Paste JSON Parameters", placeholder="Paste or edit JSON parameters here")
|
354 |
generate_from_json = gr.Button("Generate from JSON")
|
355 |
|
356 |
-
|
357 |
-
with gr.Accordion("Generation History", open=False) as history_accordion:
|
358 |
history_gallery = gr.Gallery(
|
359 |
label="History",
|
360 |
show_label=False,
|
@@ -443,14 +442,12 @@ with gr.Accordion("Generation History", open=False) as history_accordion:
|
|
443 |
outputs=[result, gr_metadata, history_gallery],
|
444 |
)
|
445 |
|
446 |
-
# Add event handler for generate_from_json button
|
447 |
generate_from_json.click(
|
448 |
fn=generate_and_update_history,
|
449 |
inputs=inputs,
|
450 |
outputs=[result, gr_metadata, history_gallery],
|
451 |
)
|
452 |
|
453 |
-
# Add event handler for image selection in history
|
454 |
history_gallery.select(
|
455 |
fn=handle_image_click,
|
456 |
outputs=[selected_image, selected_metadata],
|
|
|
353 |
json_input = gr.TextArea(label="Edit/Paste JSON Parameters", placeholder="Paste or edit JSON parameters here")
|
354 |
generate_from_json = gr.Button("Generate from JSON")
|
355 |
|
356 |
+
with gr.Accordion("Generation History", open=False) as history_accordion:
|
|
|
357 |
history_gallery = gr.Gallery(
|
358 |
label="History",
|
359 |
show_label=False,
|
|
|
442 |
outputs=[result, gr_metadata, history_gallery],
|
443 |
)
|
444 |
|
|
|
445 |
generate_from_json.click(
|
446 |
fn=generate_and_update_history,
|
447 |
inputs=inputs,
|
448 |
outputs=[result, gr_metadata, history_gallery],
|
449 |
)
|
450 |
|
|
|
451 |
history_gallery.select(
|
452 |
fn=handle_image_click,
|
453 |
outputs=[selected_image, selected_metadata],
|