Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -390,6 +390,7 @@ def video_edit(srt, input_video, input_audio= "audio.mp3"):
|
|
390 |
final_video = CompositeVideoClip([video] + subtitle_clips)
|
391 |
final_video.write_videofile(output_video_file, codec="libx264", audio_codec="aac", logger=None)
|
392 |
print('final')
|
|
|
393 |
|
394 |
|
395 |
with gr.Blocks() as demo:
|
@@ -404,6 +405,11 @@ with gr.Blocks() as demo:
|
|
404 |
with gr.Row():
|
405 |
vid_out = gr.Video()
|
406 |
btn2 = gr.Button("transcribe")
|
407 |
-
|
|
|
|
|
|
|
|
|
|
|
408 |
|
409 |
demo.launch(debug=True)
|
|
|
390 |
final_video = CompositeVideoClip([video] + subtitle_clips)
|
391 |
final_video.write_videofile(output_video_file, codec="libx264", audio_codec="aac", logger=None)
|
392 |
print('final')
|
393 |
+
return output_video_file
|
394 |
|
395 |
|
396 |
with gr.Blocks() as demo:
|
|
|
405 |
with gr.Row():
|
406 |
vid_out = gr.Video()
|
407 |
btn2 = gr.Button("transcribe")
|
408 |
+
gr.on(
|
409 |
+
triggers=[btn2.click],
|
410 |
+
fn=write_google,
|
411 |
+
inputs=out,
|
412 |
+
).then(video_edit, [out, video_path_output], outputs=[vid_out])
|
413 |
+
|
414 |
|
415 |
demo.launch(debug=True)
|