Omnibus commited on
Commit
2043290
·
1 Parent(s): c77cbc8

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -7,7 +7,7 @@ import cv2
7
  import uuid
8
  from moviepy.video.io.ffmpeg_tools import ffmpeg_extract_subclip
9
  import moviepy.video.io.ImageSequenceClip
10
-
11
  uid=uuid.uuid4()
12
  if not os.path.exists(f'{uid}'): os.makedirs(f'{uid}')
13
  if not os.path.exists(f'{uid}-frames'): os.makedirs(f'{uid}-frames')
@@ -171,7 +171,8 @@ def other():
171
  frame_num=f'Working on {i+1} of {frame_count}'
172
  yield fbox2,frame_num,None
173
  def make_gif():
174
- clip = moviepy.video.io.VideoFileClip.VideoFileClip(f"{uid}-clip.mp4")
 
175
  clip.write_gif(f"{uid}/clip_gif.gif")
176
  out = f"{uid}/clip_gif.gif"
177
  return out,out
 
7
  import uuid
8
  from moviepy.video.io.ffmpeg_tools import ffmpeg_extract_subclip
9
  import moviepy.video.io.ImageSequenceClip
10
+ from moviepy.editor import *
11
  uid=uuid.uuid4()
12
  if not os.path.exists(f'{uid}'): os.makedirs(f'{uid}')
13
  if not os.path.exists(f'{uid}-frames'): os.makedirs(f'{uid}-frames')
 
171
  frame_num=f'Working on {i+1} of {frame_count}'
172
  yield fbox2,frame_num,None
173
  def make_gif():
174
+
175
+ clip = VideoFileClip(f"{uid}-clip.mp4")
176
  clip.write_gif(f"{uid}/clip_gif.gif")
177
  out = f"{uid}/clip_gif.gif"
178
  return out,out