Spaces:
Runtime error
Runtime error
Update utils.py
Browse files
utils.py
CHANGED
@@ -32,6 +32,7 @@ def sample_frames_from_video_file(file_path: str, num_frames: int = 16):
|
|
32 |
|
33 |
|
34 |
def convert_frames_to_gif(frames):
|
|
|
35 |
converted_frames = frames.astype(np.uint8)
|
36 |
-
imageio.mimsave(
|
37 |
-
return
|
|
|
32 |
|
33 |
|
34 |
def convert_frames_to_gif(frames):
|
35 |
+
SAVE_PATH = "frames.gif"
|
36 |
converted_frames = frames.astype(np.uint8)
|
37 |
+
imageio.mimsave(SAVE_PATH, converted_frames, duration=125) # 8fps
|
38 |
+
return SAVE_PATH
|