Spaces:
Sleeping
Sleeping
Commit
•
a96698f
1
Parent(s):
3615f55
Clean app.py
Browse files
app.py
CHANGED
@@ -1,18 +1,20 @@
|
|
1 |
import gradio as gr
|
2 |
from main import main as process_video
|
3 |
|
|
|
4 |
def run_pipeline(youtube_url):
|
5 |
-
|
6 |
-
#
|
7 |
final_video_path = process_video(youtube_url)
|
8 |
|
9 |
-
# Return the path for Gradio to display
|
10 |
return final_video_path
|
11 |
|
|
|
12 |
with gr.Blocks() as demo:
|
13 |
gr.Markdown(
|
14 |
"""
|
15 |
-
|
|
|
16 |
""",
|
17 |
elem_id="header",
|
18 |
)
|
|
|
1 |
import gradio as gr
|
2 |
from main import main as process_video
|
3 |
|
4 |
+
# Runs main processing function
|
5 |
def run_pipeline(youtube_url):
|
6 |
+
|
7 |
+
# Save final video path
|
8 |
final_video_path = process_video(youtube_url)
|
9 |
|
|
|
10 |
return final_video_path
|
11 |
|
12 |
+
# Gradio UI
|
13 |
with gr.Blocks() as demo:
|
14 |
gr.Markdown(
|
15 |
"""
|
16 |
+
# Convert YouTube video to speech and writen subtitles in Spanish.
|
17 |
+
## Note: This code is optimized for GPU. Online use is slow due to CPU. Recommended local usage.
|
18 |
""",
|
19 |
elem_id="header",
|
20 |
)
|