Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -322,8 +322,8 @@ with gr.Blocks() as demo:
|
|
| 322 |
video_output = gr.Video(label="Generated Video")
|
| 323 |
error_output = gr.Textbox(label="Error Messages", placeholder="No errors", lines=5)
|
| 324 |
submit_button.click(
|
| 325 |
-
generate_video_basic,
|
| 326 |
-
inputs=[image_input,description_input],
|
| 327 |
outputs=[video_output, error_output]
|
| 328 |
)
|
| 329 |
|
|
@@ -336,10 +336,9 @@ with gr.Blocks() as demo:
|
|
| 336 |
video_output_pro = gr.Video(label="Generated Video")
|
| 337 |
error_output_pro = gr.Textbox(label="Error Messages", placeholder="No errors", lines=5)
|
| 338 |
submit_button_pro.click(
|
| 339 |
-
generate_video_pro,
|
| 340 |
inputs=[image_input_pro, description_input_pro],
|
| 341 |
outputs=[video_output_pro, error_output_pro]
|
| 342 |
)
|
| 343 |
|
| 344 |
demo.launch()
|
| 345 |
-
|
|
|
|
| 322 |
video_output = gr.Video(label="Generated Video")
|
| 323 |
error_output = gr.Textbox(label="Error Messages", placeholder="No errors", lines=5)
|
| 324 |
submit_button.click(
|
| 325 |
+
lambda img, desc: safe_generate_video(lambda: generate_video_basic(img, desc)),
|
| 326 |
+
inputs=[image_input, description_input],
|
| 327 |
outputs=[video_output, error_output]
|
| 328 |
)
|
| 329 |
|
|
|
|
| 336 |
video_output_pro = gr.Video(label="Generated Video")
|
| 337 |
error_output_pro = gr.Textbox(label="Error Messages", placeholder="No errors", lines=5)
|
| 338 |
submit_button_pro.click(
|
| 339 |
+
lambda img, desc: safe_generate_video(lambda: generate_video_pro(img, desc)),
|
| 340 |
inputs=[image_input_pro, description_input_pro],
|
| 341 |
outputs=[video_output_pro, error_output_pro]
|
| 342 |
)
|
| 343 |
|
| 344 |
demo.launch()
|
|
|