Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -221,8 +221,8 @@ def inference_and_return_video(dilation_iterations, num_inference_steps, video_s
|
|
221 |
return video_file
|
222 |
|
223 |
@spaces.GPU(duration=60)
|
224 |
-
def track_video(n_frames
|
225 |
-
|
226 |
input_points = video_state["input_points"]
|
227 |
input_labels = video_state["input_labels"]
|
228 |
frame_idx = video_state["frame_idx"]
|
@@ -407,6 +407,6 @@ with gr.Blocks() as demo:
|
|
407 |
outputs=image_output)
|
408 |
image_output.select(fn=segment_frame, inputs=[point_prompt, video_state], outputs=image_output)
|
409 |
clear_btn.click(clear_clicks, inputs=video_state, outputs=image_output)
|
410 |
-
track_btn.click(track_video, inputs=[n_frames_slider
|
411 |
|
412 |
demo.launch()
|
|
|
221 |
return video_file
|
222 |
|
223 |
@spaces.GPU(duration=60)
|
224 |
+
def track_video(n_frames):
|
225 |
+
global video_state
|
226 |
input_points = video_state["input_points"]
|
227 |
input_labels = video_state["input_labels"]
|
228 |
frame_idx = video_state["frame_idx"]
|
|
|
407 |
outputs=image_output)
|
408 |
image_output.select(fn=segment_frame, inputs=[point_prompt, video_state], outputs=image_output)
|
409 |
clear_btn.click(clear_clicks, inputs=video_state, outputs=image_output)
|
410 |
+
track_btn.click(track_video, inputs=[n_frames_slider], outputs=video_output)
|
411 |
|
412 |
demo.launch()
|