Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
@@ -94,9 +94,9 @@ if torch.cuda.is_available():
|
|
94 |
|
95 |
def change_media(image_in, video_in, selected):
|
96 |
if selected == "ExVideo":
|
97 |
-
return gr.update(visible=True), gr.update(visible=False), image_in
|
98 |
elif selected == "Diffutoon":
|
99 |
-
return gr.update(visible=False), gr.update(visible=True), video_in
|
100 |
|
101 |
|
102 |
|
@@ -254,7 +254,7 @@ with gr.Blocks(css=CSS, js=JS, theme="soft") as demo:
|
|
254 |
#stop_btn = gr.Button(value="Stop", variant="stop")
|
255 |
clear_btn = gr.ClearButton([media, seed, video])
|
256 |
|
257 |
-
selected.change(change_media, inputs=[image_in, video_in, selected], outputs=[image_in, video_in, media])
|
258 |
submit_event = submit_btn.click(fn=generate, inputs=[media, selected, seed, num_inference_steps, animatediff_batch_size, animatediff_stride, motion_bucket_id, fps_id, num_frames, prompt], outputs=[video, seed], api_name="video")
|
259 |
#stop_btn.click(fn=None, inputs=None, outputs=None, cancels=[submit_event])
|
260 |
|
|
|
94 |
|
95 |
def change_media(image_in, video_in, selected):
|
96 |
if selected == "ExVideo":
|
97 |
+
return gr.update(visible=True), gr.update(visible=False), image_in, gr.update(visible=False)
|
98 |
elif selected == "Diffutoon":
|
99 |
+
return gr.update(visible=False), gr.update(visible=True), video_in, gr.update(visible=True)
|
100 |
|
101 |
|
102 |
|
|
|
254 |
#stop_btn = gr.Button(value="Stop", variant="stop")
|
255 |
clear_btn = gr.ClearButton([media, seed, video])
|
256 |
|
257 |
+
selected.change(change_media, inputs=[image_in, video_in, selected], outputs=[image_in, video_in, media, prompt])
|
258 |
submit_event = submit_btn.click(fn=generate, inputs=[media, selected, seed, num_inference_steps, animatediff_batch_size, animatediff_stride, motion_bucket_id, fps_id, num_frames, prompt], outputs=[video, seed], api_name="video")
|
259 |
#stop_btn.click(fn=None, inputs=None, outputs=None, cancels=[submit_event])
|
260 |
|