Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -4,6 +4,8 @@ from translate import translate
|
|
4 |
from edite_video import video_edit
|
5 |
import gradio as gr
|
6 |
import requests
|
|
|
|
|
7 |
|
8 |
def extract_audio(input_video_name):
|
9 |
# Define the input video file and output audio file
|
@@ -44,6 +46,7 @@ def main(url, clip_type):
|
|
44 |
srt_list = transcribe(mp3_file)
|
45 |
subtitle_file = translate(srt_list)
|
46 |
output_video_file = video_edit(subtitle_file, video, input_audio= "audio.mp3")
|
|
|
47 |
return output_video_file
|
48 |
|
49 |
|
|
|
4 |
from edite_video import video_edit
|
5 |
import gradio as gr
|
6 |
import requests
|
7 |
+
impoprt os
|
8 |
+
|
9 |
|
10 |
def extract_audio(input_video_name):
|
11 |
# Define the input video file and output audio file
|
|
|
46 |
srt_list = transcribe(mp3_file)
|
47 |
subtitle_file = translate(srt_list)
|
48 |
output_video_file = video_edit(subtitle_file, video, input_audio= "audio.mp3")
|
49 |
+
os.remove(subtitle_file)
|
50 |
return output_video_file
|
51 |
|
52 |
|