ysharma HF staff commited on
Commit
1a39558
1 Parent(s): 4b8afb6
Files changed (1) hide show
  1. app.py +5 -2
app.py CHANGED
@@ -159,13 +159,16 @@ def get_gif_timestamps(giflist_indxs, words_timestamp):
159
 
160
  #extracting the video and building and serving a .gif image
161
  def gen_moviepy_gif(start_seconds, end_seconds):
 
162
  video_path = "./ShiaLaBeouf.mp4"
163
  video = mp.VideoFileClip(video_path)
164
  final_clip = video.subclip(start_seconds, end_seconds)
165
  #final_clip.write_videofile("/content/gdrive/My Drive/AI/videoedit/gif1.mp4")
166
- final_clip.write_gif("./gifimage.gif")
167
- gif_img = mp.VideoFileClip("./gifimage.gif")
 
168
  #final_clip.close()
 
169
  return gif_img
170
 
171
 
 
159
 
160
  #extracting the video and building and serving a .gif image
161
  def gen_moviepy_gif(start_seconds, end_seconds):
162
+ print("******** inside moviepy_gif () ***************")
163
  video_path = "./ShiaLaBeouf.mp4"
164
  video = mp.VideoFileClip(video_path)
165
  final_clip = video.subclip(start_seconds, end_seconds)
166
  #final_clip.write_videofile("/content/gdrive/My Drive/AI/videoedit/gif1.mp4")
167
+ final_clip.write_gif("gifimage.gif")
168
+ print("I am here now")
169
+ gif_img = mp.VideoFileClip("gifimage.gif")
170
  #final_clip.close()
171
+ print("At the very end")
172
  return gif_img
173
 
174