Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
|
@@ -359,7 +359,7 @@ def create_ui() -> gr.Blocks:
|
|
| 359 |
vis.append(gr.update(visible=False, value=None))
|
| 360 |
return (*vis, msg)
|
| 361 |
|
| 362 |
-
generate.click(
|
| 363 |
fn=_process_and_update,
|
| 364 |
inputs=[video_input, text_input, guidance_scale, steps, samples],
|
| 365 |
outputs=[v1, v2, v3, v4, v5, v6, status],
|
|
@@ -404,8 +404,8 @@ def create_ui() -> gr.Blocks:
|
|
| 404 |
# Refresh via button
|
| 405 |
refresh.click(_refresh_gallery, outputs=[gallery])
|
| 406 |
|
| 407 |
-
# Also refresh after generation finishes
|
| 408 |
-
|
| 409 |
|
| 410 |
with gr.Tab("API & MCP"):
|
| 411 |
gr.Markdown(
|
|
|
|
| 359 |
vis.append(gr.update(visible=False, value=None))
|
| 360 |
return (*vis, msg)
|
| 361 |
|
| 362 |
+
gen_evt = generate.click(
|
| 363 |
fn=_process_and_update,
|
| 364 |
inputs=[video_input, text_input, guidance_scale, steps, samples],
|
| 365 |
outputs=[v1, v2, v3, v4, v5, v6, status],
|
|
|
|
| 404 |
# Refresh via button
|
| 405 |
refresh.click(_refresh_gallery, outputs=[gallery])
|
| 406 |
|
| 407 |
+
# Also refresh after generation finishes (chain on the event, NOT the button)
|
| 408 |
+
gen_evt.then(_refresh_gallery, inputs=None, outputs=[gallery])
|
| 409 |
|
| 410 |
with gr.Tab("API & MCP"):
|
| 411 |
gr.Markdown(
|