Spaces:
Paused
Paused
Commit ·
dcf8ec1
1
Parent(s): 38234cb
Update app.py
Browse files
app.py
CHANGED
|
@@ -47,7 +47,6 @@ def get_video_duration(video_path):
|
|
| 47 |
return duration
|
| 48 |
else:
|
| 49 |
return None
|
| 50 |
-
|
| 51 |
|
| 52 |
def process_video(Video, target_language):
|
| 53 |
current_path = os.getcwd()
|
|
@@ -65,7 +64,6 @@ def process_video(Video, target_language):
|
|
| 65 |
print("Video is longer than 15 minutes.")
|
| 66 |
gr.Warning("Warning: Video is longer than 15 minutes.")
|
| 67 |
return None
|
| 68 |
-
|
| 69 |
audio_file = f"{common_uuid}.wav"
|
| 70 |
run(["ffmpeg", "-i", Video, audio_file])
|
| 71 |
|
|
@@ -164,7 +162,6 @@ iface = gr.Interface(
|
|
| 164 |
description="""This tool was developed by [@artificialguybr](https://twitter.com/artificialguybr) using entirely open-source tools. Special thanks to Hugging Face for the GPU support.""",
|
| 165 |
allow_flagging=False
|
| 166 |
)
|
| 167 |
-
|
| 168 |
with gr.Blocks() as demo:
|
| 169 |
iface.render()
|
| 170 |
gr.Markdown("""
|
|
|
|
| 47 |
return duration
|
| 48 |
else:
|
| 49 |
return None
|
|
|
|
| 50 |
|
| 51 |
def process_video(Video, target_language):
|
| 52 |
current_path = os.getcwd()
|
|
|
|
| 64 |
print("Video is longer than 15 minutes.")
|
| 65 |
gr.Warning("Warning: Video is longer than 15 minutes.")
|
| 66 |
return None
|
|
|
|
| 67 |
audio_file = f"{common_uuid}.wav"
|
| 68 |
run(["ffmpeg", "-i", Video, audio_file])
|
| 69 |
|
|
|
|
| 162 |
description="""This tool was developed by [@artificialguybr](https://twitter.com/artificialguybr) using entirely open-source tools. Special thanks to Hugging Face for the GPU support.""",
|
| 163 |
allow_flagging=False
|
| 164 |
)
|
|
|
|
| 165 |
with gr.Blocks() as demo:
|
| 166 |
iface.render()
|
| 167 |
gr.Markdown("""
|