evalstate HF Staff commited on
Commit
1ac5d4a
·
verified ·
1 Parent(s): 9cf0b0b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +36 -36
app.py CHANGED
@@ -515,44 +515,44 @@ with gr.Blocks() as demo:
515
  ).then(fn=end_reset, inputs=None, outputs=[is_reset], queue=False)
516
 
517
  # Manual generation with video button visibility control
518
- def infer_and_show_video_button(*args: Any):
519
- """
520
- Wrapper around `infer_camera_edit` that also controls the visibility
521
- of the 'Create Video Between Images' button.
522
-
523
- The first argument in `args` is expected to be the input image; if both
524
- input and output images are present, the video button is shown.
525
-
526
- Args:
527
- *args:
528
- Positional arguments forwarded directly to `infer_camera_edit`.
529
-
530
- Returns:
531
- tuple:
532
- (output_image, seed, prompt, video_button_visibility_update)
533
- """
534
- result_img, result_seed, result_prompt = infer_camera_edit(*args)
535
- # Show video button if we have both input and output images
536
- show_button = args[0] is not None and result_img is not None
537
- return result_img, result_seed, result_prompt, gr.update(visible=show_button)
538
-
539
- run_event = run_btn.click(
540
- fn=infer_and_show_video_button,
541
- inputs=inputs,
542
- outputs=outputs + [create_video_button]
543
- )
544
 
545
  # Video creation
546
- create_video_button.click(
547
- fn=lambda: gr.update(visible=True),
548
- outputs=[video_group],
549
- api_name=False
550
- ).then(
551
- fn=create_video_between_images,
552
- inputs=[image, result, prompt_preview],
553
- outputs=[video_output],
554
- api_name=False
555
- )
556
 
557
  # Examples
558
  gr.Examples(
 
515
  ).then(fn=end_reset, inputs=None, outputs=[is_reset], queue=False)
516
 
517
  # Manual generation with video button visibility control
518
+ # def infer_and_show_video_button(*args: Any):
519
+ # """
520
+ # Wrapper around `infer_camera_edit` that also controls the visibility
521
+ # of the 'Create Video Between Images' button.
522
+
523
+ # The first argument in `args` is expected to be the input image; if both
524
+ # input and output images are present, the video button is shown.
525
+
526
+ # Args:
527
+ # *args:
528
+ # Positional arguments forwarded directly to `infer_camera_edit`.
529
+
530
+ # Returns:
531
+ # tuple:
532
+ # (output_image, seed, prompt, video_button_visibility_update)
533
+ # """
534
+ # result_img, result_seed, result_prompt = infer_camera_edit(*args)
535
+ # # Show video button if we have both input and output images
536
+ # show_button = args[0] is not None and result_img is not None
537
+ # return result_img, result_seed, result_prompt, gr.update(visible=show_button)
538
+
539
+ # run_event = run_btn.click(
540
+ # fn=infer_and_show_video_button,
541
+ # inputs=inputs,
542
+ # outputs=outputs + [create_video_button]
543
+ # )
544
 
545
  # Video creation
546
+ # create_video_button.click(
547
+ # fn=lambda: gr.update(visible=True),
548
+ # outputs=[video_group],
549
+ # api_name=False
550
+ # ).then(
551
+ # fn=create_video_between_images,
552
+ # inputs=[image, result, prompt_preview],
553
+ # outputs=[video_output],
554
+ # api_name=False
555
+ # )
556
 
557
  # Examples
558
  gr.Examples(