Spaces:
Runtime error
Runtime error
Update utils.py
Browse files
utils.py
CHANGED
@@ -37,7 +37,7 @@ def get_num_total_frames(file_path: str):
|
|
37 |
def convert_frames_to_gif(frames, save_path: str = "frames.gif"):
|
38 |
converted_frames = frames.astype(np.uint8)
|
39 |
Path(save_path).parent.mkdir(parents=True, exist_ok=True)
|
40 |
-
imageio.mimsave(save_path, converted_frames,
|
41 |
return save_path
|
42 |
|
43 |
|
|
|
37 |
def convert_frames_to_gif(frames, save_path: str = "frames.gif"):
|
38 |
converted_frames = frames.astype(np.uint8)
|
39 |
Path(save_path).parent.mkdir(parents=True, exist_ok=True)
|
40 |
+
imageio.mimsave(save_path, converted_frames, fps=8)
|
41 |
return save_path
|
42 |
|
43 |
|