heheyas commited on
Commit
9ab6bb1
1 Parent(s): 9019ad0

imageio instead of mediapy

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -26,6 +26,7 @@ from mediapy import write_video
26
  from pathlib import Path
27
  import spaces
28
  from huggingface_hub import hf_hub_download
 
29
 
30
 
31
  @spaces.GPU
@@ -134,7 +135,8 @@ def do_sample(
134
  .numpy()
135
  .astype(np.uint8)
136
  )
137
- write_video(video_path, frames, fps=6)
 
138
 
139
  return video_path
140
 
 
26
  from pathlib import Path
27
  import spaces
28
  from huggingface_hub import hf_hub_download
29
+ import imageio
30
 
31
 
32
  @spaces.GPU
 
135
  .numpy()
136
  .astype(np.uint8)
137
  )
138
+ # write_video(video_path, frames, fps=6)
139
+ imageio.mimwrite(video_path, frames, fps=6)
140
 
141
  return video_path
142