Spaces:
Starting
Starting
Update app.py
Browse files
app.py
CHANGED
@@ -46,10 +46,11 @@ def zip_files(files_in, files_out):
|
|
46 |
|
47 |
def create_video(frames, fps, type):
|
48 |
print("building video result")
|
|
|
49 |
for j, img in enumerate(frames):
|
50 |
-
|
51 |
|
52 |
-
mediapy.write_video(type + "_result.mp4",
|
53 |
return type + "_result.mp4"
|
54 |
|
55 |
@torch.no_grad()
|
|
|
46 |
|
47 |
def create_video(frames, fps, type):
|
48 |
print("building video result")
|
49 |
+
imgs = []
|
50 |
for j, img in enumerate(frames):
|
51 |
+
imgs[j] = cv2.cvtColor(cv2.imread(img).astype(np.uint8), cv2.COLOR_BGR2RGB)
|
52 |
|
53 |
+
mediapy.write_video(type + "_result.mp4", imgs, fps=fps)
|
54 |
return type + "_result.mp4"
|
55 |
|
56 |
@torch.no_grad()
|