Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
|
@@ -56,6 +56,7 @@ def main(url, clip_type, parameters, progress=gr.Progress()):
|
|
| 56 |
progress(100, desc="finish")
|
| 57 |
os.remove(subtitle_file)
|
| 58 |
else:
|
|
|
|
| 59 |
progress(0, desc="Starting")
|
| 60 |
video = download_video(url)
|
| 61 |
progress(5, desc="downloaded")
|
|
@@ -66,7 +67,7 @@ def main(url, clip_type, parameters, progress=gr.Progress()):
|
|
| 66 |
subtitle_file = translate(srt_list)
|
| 67 |
progress(55, desc="translate")
|
| 68 |
print(parameters)
|
| 69 |
-
output_video_file = video_edit(subtitle_file, video,
|
| 70 |
progress(100, desc="finish")
|
| 71 |
os.remove(subtitle_file)
|
| 72 |
return output_video_file
|
|
|
|
| 56 |
progress(100, desc="finish")
|
| 57 |
os.remove(subtitle_file)
|
| 58 |
else:
|
| 59 |
+
color, font = parameters.split(",")
|
| 60 |
progress(0, desc="Starting")
|
| 61 |
video = download_video(url)
|
| 62 |
progress(5, desc="downloaded")
|
|
|
|
| 67 |
subtitle_file = translate(srt_list)
|
| 68 |
progress(55, desc="translate")
|
| 69 |
print(parameters)
|
| 70 |
+
output_video_file = video_edit(subtitle_file, video, color, font, input_audio= "audio.mp3")
|
| 71 |
progress(100, desc="finish")
|
| 72 |
os.remove(subtitle_file)
|
| 73 |
return output_video_file
|