Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -9,7 +9,7 @@ def load_video_yt(vid):
|
|
9 |
vid = yt.streams.filter(progressive=True, file_extension='mp4').order_by('resolution').desc().first().download(filename=f"{uid}-tmp.mp4")
|
10 |
vid_aud = yt.streams.filter(only_audio=True)[0].download(filename=f"{uid}-tmp_aud.mp4")
|
11 |
print (f'Video Length: {yt.length}')
|
12 |
-
return
|
13 |
|
14 |
def trim_vid():
|
15 |
ffmpeg_extract_subclip("video1.mp4", start_time, end_time, targetname="test.mp4")
|
@@ -36,7 +36,13 @@ def make_model(vid_path):
|
|
36 |
sfm.structure_from_motion()
|
37 |
|
38 |
with gr.Blocks() as app:
|
39 |
-
|
40 |
-
|
|
|
|
|
|
|
|
|
41 |
out=gr.Files()
|
|
|
|
|
42 |
app.launch()
|
|
|
9 |
vid = yt.streams.filter(progressive=True, file_extension='mp4').order_by('resolution').desc().first().download(filename=f"{uid}-tmp.mp4")
|
10 |
vid_aud = yt.streams.filter(only_audio=True)[0].download(filename=f"{uid}-tmp_aud.mp4")
|
11 |
print (f'Video Length: {yt.length}')
|
12 |
+
return f"{uid}-tmp_aud.mp4"
|
13 |
|
14 |
def trim_vid():
|
15 |
ffmpeg_extract_subclip("video1.mp4", start_time, end_time, targetname="test.mp4")
|
|
|
36 |
sfm.structure_from_motion()
|
37 |
|
38 |
with gr.Blocks() as app:
|
39 |
+
with gr.Row():
|
40 |
+
inp_url=gr.Textbox(label="URL")
|
41 |
+
load_yt_btn=gr.Button()
|
42 |
+
with gr.Row():
|
43 |
+
pre_vid = gr.Video()
|
44 |
+
clip_vid=gr.Video()
|
45 |
out=gr.Files()
|
46 |
+
load_yt_btn.click(load_video_yt, inp_url, [pre_vid])
|
47 |
+
|
48 |
app.launch()
|