fcakyon commited on
Commit
db0445e
β€’
1 Parent(s): 37b6dca

Update utils.py

Browse files
Files changed (1) hide show
  1. utils.py +3 -2
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(save_path, converted_frames, duration=125) # 8fps
37
- return "frames.gif"
 
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