Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
import gc
|
2 |
import math
|
3 |
-
|
4 |
|
5 |
import gradio as gr
|
6 |
import numpy as np
|
@@ -127,8 +127,11 @@ def predict_fn(filepath, start_sec, duration):
|
|
127 |
|
128 |
try:
|
129 |
write_video('out.mp4', video_all, fps=fps, audio_array=audio_all, audio_fps=audio_fps, audio_codec='aac')
|
130 |
-
except:
|
131 |
-
print("❌ Error when writing with audio...trying without audio")
|
|
|
|
|
|
|
132 |
write_video('out.mp4', video_all, fps=fps)
|
133 |
|
134 |
print(f"✅ Done!")
|
|
|
1 |
import gc
|
2 |
import math
|
3 |
+
import traceback
|
4 |
|
5 |
import gradio as gr
|
6 |
import numpy as np
|
|
|
127 |
|
128 |
try:
|
129 |
write_video('out.mp4', video_all, fps=fps, audio_array=audio_all, audio_fps=audio_fps, audio_codec='aac')
|
130 |
+
except Exception:
|
131 |
+
print("❌ Error when writing with audio...trying without audio:")
|
132 |
+
print(traceback.format_exc())
|
133 |
+
print()
|
134 |
+
print(f"audio...", audio.shape)
|
135 |
write_video('out.mp4', video_all, fps=fps)
|
136 |
|
137 |
print(f"✅ Done!")
|