ysharma HF staff commited on
Commit
4b931c3
1 Parent(s): ef705b3
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -71,13 +71,13 @@ def generate_gifs(gif_transcript, words, words_timestamp):
71
  start_seconds, end_seconds = get_gif_timestamps(giflist_indxs, words_timestamp)
72
  print(f"start_seconds, end_seconds are : ({start_seconds}, {end_seconds})")
73
  #generated .gif image
74
- im, gif_img, gif_vid, vid_cap = gen_moviepy_gif(start_seconds, end_seconds)
75
  im.save('./gifimage1.gif', save_all=True)
76
  #gif_img = gen_moviepy_gif(start_seconds, end_seconds)
77
  #gif_img = f"./gifimage.gif"
78
  #html_out = "<img src= '" + gif_img + "' alt='create a gif from video' width='100%'/>"
79
  #print("html out is :", html_out)
80
- return vid_cap #gif_vid
81
 
82
 
83
  #calling the hosted model
@@ -193,7 +193,7 @@ def gen_moviepy_gif(start_seconds, end_seconds):
193
  vid_cap = cv2.VideoCapture('gifimage.mp4')
194
 
195
  print("At the very end")
196
- return im, gif_img, gif_vid, vid_cap
197
 
198
 
199
  # showing gif
 
71
  start_seconds, end_seconds = get_gif_timestamps(giflist_indxs, words_timestamp)
72
  print(f"start_seconds, end_seconds are : ({start_seconds}, {end_seconds})")
73
  #generated .gif image
74
+ im, gif_img, gif_vid, vid_cap, gif_video_out = gen_moviepy_gif(start_seconds, end_seconds)
75
  im.save('./gifimage1.gif', save_all=True)
76
  #gif_img = gen_moviepy_gif(start_seconds, end_seconds)
77
  #gif_img = f"./gifimage.gif"
78
  #html_out = "<img src= '" + gif_img + "' alt='create a gif from video' width='100%'/>"
79
  #print("html out is :", html_out)
80
+ return gif_video_out #vid_cap #gif_vid
81
 
82
 
83
  #calling the hosted model
 
193
  vid_cap = cv2.VideoCapture('gifimage.mp4')
194
 
195
  print("At the very end")
196
+ return im, gif_img, gif_vid, vid_cap, "gifimage.mp4"
197
 
198
 
199
  # showing gif