Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -314,10 +314,10 @@ def generate_video(
|
|
| 314 |
except Exception as e:
|
| 315 |
print(f"Error adding audio: {e}")
|
| 316 |
# В случае ошибки возвращаем видео без звука
|
| 317 |
-
return video_path, current_seed
|
| 318 |
else:
|
| 319 |
print("FFmpeg not available, returning video without audio")
|
| 320 |
-
return video_path, current_seed
|
| 321 |
|
| 322 |
|
| 323 |
with gr.Blocks() as demo:
|
|
@@ -346,7 +346,7 @@ with gr.Blocks() as demo:
|
|
| 346 |
negative_prompt_input, duration_seconds_input,
|
| 347 |
guidance_scale_input, guidance_scale_2_input, seed_input, randomize_seed_checkbox
|
| 348 |
]
|
| 349 |
-
generate_button.click(fn=generate_video, inputs=ui_inputs, outputs=[
|
| 350 |
|
| 351 |
gr.Examples(
|
| 352 |
examples=[
|
|
@@ -366,7 +366,7 @@ with gr.Blocks() as demo:
|
|
| 366 |
6,
|
| 367 |
],
|
| 368 |
],
|
| 369 |
-
inputs=[input_image_component, prompt_input, steps_slider], outputs=[
|
| 370 |
)
|
| 371 |
|
| 372 |
def check_ffmpeg():
|
|
|
|
| 314 |
except Exception as e:
|
| 315 |
print(f"Error adding audio: {e}")
|
| 316 |
# В случае ошибки возвращаем видео без звука
|
| 317 |
+
return video_path, video_path, current_seed
|
| 318 |
else:
|
| 319 |
print("FFmpeg not available, returning video without audio")
|
| 320 |
+
return video_path, video_path, current_seed
|
| 321 |
|
| 322 |
|
| 323 |
with gr.Blocks() as demo:
|
|
|
|
| 346 |
negative_prompt_input, duration_seconds_input,
|
| 347 |
guidance_scale_input, guidance_scale_2_input, seed_input, randomize_seed_checkbox
|
| 348 |
]
|
| 349 |
+
generate_button.click(fn=generate_video, inputs=ui_inputs, outputs=[video_output_1, video_output_2, seed_input])
|
| 350 |
|
| 351 |
gr.Examples(
|
| 352 |
examples=[
|
|
|
|
| 366 |
6,
|
| 367 |
],
|
| 368 |
],
|
| 369 |
+
inputs=[input_image_component, prompt_input, steps_slider], outputs=[video_output_1, video_output_2, seed_input], fn=generate_video, cache_examples="lazy"
|
| 370 |
)
|
| 371 |
|
| 372 |
def check_ffmpeg():
|