Spaces:
Runtime error
Runtime error
Besar
commited on
Commit
·
831f840
1
Parent(s):
bba4493
app.py
CHANGED
@@ -80,7 +80,7 @@ def download_video(video_url):
|
|
80 |
|
81 |
return video_path
|
82 |
|
83 |
-
def
|
84 |
|
85 |
video_path = download_video(video_url)
|
86 |
|
@@ -505,7 +505,9 @@ with gr.Blocks() as iface:
|
|
505 |
# extract frames
|
506 |
with gr.Column():
|
507 |
extract_frames_button = gr.Button(value="Get video info", interactive=True, variant="primary")
|
508 |
-
|
|
|
|
|
509 |
# click points settins, negative or positive, mode continuous or single
|
510 |
with gr.Row():
|
511 |
with gr.Row():
|
@@ -558,11 +560,17 @@ with gr.Blocks() as iface:
|
|
558 |
outputs=[video_demo_operation],
|
559 |
# cache_examples=True,
|
560 |
)
|
561 |
-
|
562 |
-
|
563 |
fn=download_video,
|
564 |
-
inputs=[video_input],outputs=[video_path], api_name="
|
|
|
|
|
|
|
|
|
|
|
565 |
)
|
|
|
566 |
# first step: get the video information
|
567 |
extract_frames_button.click(
|
568 |
fn=get_frames_from_video,
|
|
|
80 |
|
81 |
return video_path
|
82 |
|
83 |
+
def process_video(video_url):
|
84 |
|
85 |
video_path = download_video(video_url)
|
86 |
|
|
|
505 |
# extract frames
|
506 |
with gr.Column():
|
507 |
extract_frames_button = gr.Button(value="Get video info", interactive=True, variant="primary")
|
508 |
+
download_video_button = gr.Button(value="Download video", interactive=True, variant="primary")
|
509 |
+
process_video_button = gr.Button(value="Process video", interactive=True, variant="primary")
|
510 |
+
|
511 |
# click points settins, negative or positive, mode continuous or single
|
512 |
with gr.Row():
|
513 |
with gr.Row():
|
|
|
560 |
outputs=[video_demo_operation],
|
561 |
# cache_examples=True,
|
562 |
)
|
563 |
+
|
564 |
+
download_video_button.click(
|
565 |
fn=download_video,
|
566 |
+
inputs=[video_input],outputs=[video_path], api_name="api_download_video"
|
567 |
+
)
|
568 |
+
|
569 |
+
process_video_button.click(
|
570 |
+
fn=process_video,
|
571 |
+
inputs=[video_input],outputs=[video_path], api_name="api_process_video"
|
572 |
)
|
573 |
+
|
574 |
# first step: get the video information
|
575 |
extract_frames_button.click(
|
576 |
fn=get_frames_from_video,
|