Spaces:
Configuration error
Configuration error
heheyas
commited on
Commit
·
0d421c9
1
Parent(s):
4c606b8
fix
Browse files- app.py +10 -10
- requirements.txt +2 -0
app.py
CHANGED
|
@@ -138,16 +138,16 @@ def do_sample(
|
|
| 138 |
.astype(np.uint8)
|
| 139 |
)
|
| 140 |
# write_video(video_path, frames, fps=6)
|
| 141 |
-
writer = cv2.VideoWriter(
|
| 142 |
-
|
| 143 |
-
|
| 144 |
-
|
| 145 |
-
|
| 146 |
-
)
|
| 147 |
-
for fr in frames:
|
| 148 |
-
|
| 149 |
-
writer.release()
|
| 150 |
-
|
| 151 |
|
| 152 |
return video_path
|
| 153 |
|
|
|
|
| 138 |
.astype(np.uint8)
|
| 139 |
)
|
| 140 |
# write_video(video_path, frames, fps=6)
|
| 141 |
+
# writer = cv2.VideoWriter(
|
| 142 |
+
# video_path,
|
| 143 |
+
# cv2.VideoWriter_fourcc("m", "p", "4", "v"),
|
| 144 |
+
# 6,
|
| 145 |
+
# (frames.shape[-1], frames.shape[-2]),
|
| 146 |
+
# )
|
| 147 |
+
# for fr in frames:
|
| 148 |
+
# writer.write(cv2.cvtColor(fr, cv2.COLOR_RGB2BGR))
|
| 149 |
+
# writer.release()
|
| 150 |
+
imageio.mimwrite(video_path, frames, fps=6)
|
| 151 |
|
| 152 |
return video_path
|
| 153 |
|
requirements.txt
CHANGED
|
@@ -44,3 +44,5 @@ wget
|
|
| 44 |
rembg
|
| 45 |
kiui
|
| 46 |
spaces
|
|
|
|
|
|
|
|
|
| 44 |
rembg
|
| 45 |
kiui
|
| 46 |
spaces
|
| 47 |
+
imageio==2.19.3
|
| 48 |
+
imageio-ffmpeg==0.4.7
|