Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
@@ -67,11 +67,15 @@ def convert_video(video_file: File, quality, aspect_ratio, video_url):
|
|
67 |
print("ffmpeg is not installed.")
|
68 |
return None
|
69 |
|
70 |
-
|
|
|
|
|
|
|
|
|
71 |
|
72 |
# Return the output file directly
|
73 |
return components.Video(output_path)
|
74 |
|
75 |
from gradio import outputs
|
76 |
|
77 |
-
gr.Interface(convert_video, inputs=[video_file, quality, aspect_ratio, video_url], outputs=[outputs.Video()]).launch(share=
|
|
|
67 |
print("ffmpeg is not installed.")
|
68 |
return None
|
69 |
|
70 |
+
for i in range(10):
|
71 |
+
if os.path.exists(output_path):
|
72 |
+
break
|
73 |
+
else:
|
74 |
+
time.sleep(1)
|
75 |
|
76 |
# Return the output file directly
|
77 |
return components.Video(output_path)
|
78 |
|
79 |
from gradio import outputs
|
80 |
|
81 |
+
gr.Interface(convert_video, inputs=[video_file, quality, aspect_ratio, video_url], outputs=[outputs.Video()]).launch(share=True)
|