Spaces:
Running
on
L40S
Running
on
L40S
Update app.py
Browse files
app.py
CHANGED
@@ -562,6 +562,9 @@ examples_video = [
|
|
562 |
["./datasets/cached_audio/101099-00_18_09-00_18_19.mp4"],
|
563 |
]
|
564 |
|
|
|
|
|
|
|
565 |
def make_demo():
|
566 |
with gr.Blocks(analytics_enabled=False) as Interface:
|
567 |
# First row: Audio upload and Audio examples with adjusted ratio
|
@@ -635,7 +638,7 @@ def make_demo():
|
|
635 |
inputs=[audio_input],
|
636 |
outputs=[video_output_1, video_output_2, file_output_1, file_output_2],
|
637 |
label="Select existing Audio examples",
|
638 |
-
cache_examples=
|
639 |
)
|
640 |
with gr.Column(scale=1):
|
641 |
video_input = gr.Video(label="Your Character", elem_classes="video")
|
@@ -645,7 +648,7 @@ def make_demo():
|
|
645 |
inputs=[video_input], # Correctly refer to video input
|
646 |
outputs=[video_output_1, video_output_2, file_output_1, file_output_2],
|
647 |
label="Character Examples",
|
648 |
-
cache_examples=
|
649 |
)
|
650 |
|
651 |
# Fourth row: Generate video button
|
@@ -659,6 +662,17 @@ def make_demo():
|
|
659 |
outputs=[video_output_1, video_output_2, file_output_1, file_output_2]
|
660 |
)
|
661 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
662 |
return Interface
|
663 |
|
664 |
if __name__ == "__main__":
|
|
|
562 |
["./datasets/cached_audio/101099-00_18_09-00_18_19.mp4"],
|
563 |
]
|
564 |
|
565 |
+
combined_examples = [
|
566 |
+
[audio, video] for audio in examples_audio for video in examples_video
|
567 |
+
]
|
568 |
def make_demo():
|
569 |
with gr.Blocks(analytics_enabled=False) as Interface:
|
570 |
# First row: Audio upload and Audio examples with adjusted ratio
|
|
|
638 |
inputs=[audio_input],
|
639 |
outputs=[video_output_1, video_output_2, file_output_1, file_output_2],
|
640 |
label="Select existing Audio examples",
|
641 |
+
cache_examples=False
|
642 |
)
|
643 |
with gr.Column(scale=1):
|
644 |
video_input = gr.Video(label="Your Character", elem_classes="video")
|
|
|
648 |
inputs=[video_input], # Correctly refer to video input
|
649 |
outputs=[video_output_1, video_output_2, file_output_1, file_output_2],
|
650 |
label="Character Examples",
|
651 |
+
cache_examples=False
|
652 |
)
|
653 |
|
654 |
# Fourth row: Generate video button
|
|
|
662 |
outputs=[video_output_1, video_output_2, file_output_1, file_output_2]
|
663 |
)
|
664 |
|
665 |
+
with gr.Row():
|
666 |
+
with gr.Column(scale=4):
|
667 |
+
gr.Examples(
|
668 |
+
examples=combined_examples,
|
669 |
+
inputs=[audio_input, video_input], # Both audio and video as inputs
|
670 |
+
outputs=[video_output_1, video_output_2, file_output_1, file_output_2],
|
671 |
+
fn=tango, # Function that processes both audio and video inputs
|
672 |
+
label="Select Combined Audio and Video Examples (Cached)",
|
673 |
+
cache_examples=True
|
674 |
+
)
|
675 |
+
|
676 |
return Interface
|
677 |
|
678 |
if __name__ == "__main__":
|