Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -221,8 +221,7 @@ 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 |
-
global video_state
|
226 |
input_points = video_state["input_points"]
|
227 |
input_labels = video_state["input_labels"]
|
228 |
frame_idx = video_state["frame_idx"]
|
@@ -285,7 +284,7 @@ def track_video(n_frames):
|
|
285 |
video_file = f"/tmp/{time.time()}-{random.random()}-tracked_output.mp4"
|
286 |
clip = ImageSequenceClip(output_frames, fps=15)
|
287 |
clip.write_videofile(video_file, codec='libx264', audio=False, verbose=False, logger=None)
|
288 |
-
return video_file
|
289 |
|
290 |
text = """
|
291 |
<div style='text-align:center; font-size:32px; font-family: Arial, Helvetica, sans-serif;'>
|
|
|
221 |
return video_file
|
222 |
|
223 |
@spaces.GPU(duration=60)
|
224 |
+
def track_video(n_frames,video_state):
|
|
|
225 |
input_points = video_state["input_points"]
|
226 |
input_labels = video_state["input_labels"]
|
227 |
frame_idx = video_state["frame_idx"]
|
|
|
284 |
video_file = f"/tmp/{time.time()}-{random.random()}-tracked_output.mp4"
|
285 |
clip = ImageSequenceClip(output_frames, fps=15)
|
286 |
clip.write_videofile(video_file, codec='libx264', audio=False, verbose=False, logger=None)
|
287 |
+
return video_file,video_state
|
288 |
|
289 |
text = """
|
290 |
<div style='text-align:center; font-size:32px; font-family: Arial, Helvetica, sans-serif;'>
|