freealise commited on
Commit
74cd1a8
1 Parent(s): 4aea9f1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
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
- frames[j] = cv2.cvtColor(cv2.imread(img).astype(np.uint8), cv2.COLOR_BGR2RGB)
51
 
52
- mediapy.write_video(type + "_result.mp4", frames, fps=fps)
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()