Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -24,6 +24,8 @@ def main(url, parameters, progress=gr.Progress()):
|
|
24 |
url=url,
|
25 |
api_name="/transcribe"
|
26 |
)
|
|
|
|
|
27 |
srt_file, video, mp3_file = job.outputs()
|
28 |
client.close()
|
29 |
print(mp3_file)
|
@@ -35,6 +37,8 @@ def main(url, parameters, progress=gr.Progress()):
|
|
35 |
max_chars=3000,
|
36 |
api_name="/translate"
|
37 |
)
|
|
|
|
|
38 |
subtitle_file = job.outputs()
|
39 |
client.close()
|
40 |
|
@@ -50,6 +54,8 @@ def main(url, parameters, progress=gr.Progress()):
|
|
50 |
input_audio=handle_file(mp3_file),
|
51 |
api_name="/video_edit"
|
52 |
)
|
|
|
|
|
53 |
output_video_file = job.outputs()
|
54 |
client.close()
|
55 |
output_video_file = output_video_file['video']
|
|
|
24 |
url=url,
|
25 |
api_name="/transcribe"
|
26 |
)
|
27 |
+
while not job.done():
|
28 |
+
time.sleep(0.1)
|
29 |
srt_file, video, mp3_file = job.outputs()
|
30 |
client.close()
|
31 |
print(mp3_file)
|
|
|
37 |
max_chars=3000,
|
38 |
api_name="/translate"
|
39 |
)
|
40 |
+
while not job.done():
|
41 |
+
time.sleep(0.1)
|
42 |
subtitle_file = job.outputs()
|
43 |
client.close()
|
44 |
|
|
|
54 |
input_audio=handle_file(mp3_file),
|
55 |
api_name="/video_edit"
|
56 |
)
|
57 |
+
while not job.done():
|
58 |
+
time.sleep(0.1)
|
59 |
output_video_file = job.outputs()
|
60 |
client.close()
|
61 |
output_video_file = output_video_file['video']
|