cocktailpeanut commited on
Commit
8008be0
1 Parent(s): cabc97a
Files changed (2) hide show
  1. app.py +2 -0
  2. requirements.txt +1 -1
app.py CHANGED
@@ -279,6 +279,7 @@ def generate_video_from_text(
279
  output_path, cv2.VideoWriter_fourcc(*"mp4v"), frame_rate, (width, height)
280
  )
281
  for frame in video_np[..., ::-1]:
 
282
  out.write(frame)
283
  out.release()
284
  # Explicitly delete tensors and clear cache
@@ -364,6 +365,7 @@ def generate_video_from_image(
364
  output_path, cv2.VideoWriter_fourcc(*"mp4v"), frame_rate, (width, height)
365
  )
366
  for frame in video_np[..., ::-1]:
 
367
  out.write(frame)
368
  out.release()
369
  except Exception as e:
 
279
  output_path, cv2.VideoWriter_fourcc(*"mp4v"), frame_rate, (width, height)
280
  )
281
  for frame in video_np[..., ::-1]:
282
+ frame = np.array(frame)
283
  out.write(frame)
284
  out.release()
285
  # Explicitly delete tensors and clear cache
 
365
  output_path, cv2.VideoWriter_fourcc(*"mp4v"), frame_rate, (width, height)
366
  )
367
  for frame in video_np[..., ::-1]:
368
+ frame = np.array(frame)
369
  out.write(frame)
370
  out.release()
371
  except Exception as e:
requirements.txt CHANGED
@@ -6,7 +6,7 @@ sentencepiece>=0.1.96
6
  accelerate
7
  einops
8
  matplotlib
9
- opencv-python==4.5.5
10
  beautifulsoup4
11
  ftfy
12
  gradio
 
6
  accelerate
7
  einops
8
  matplotlib
9
+ opencv-python
10
  beautifulsoup4
11
  ftfy
12
  gradio