Omnibus commited on
Commit
d98dc4b
·
1 Parent(s): c6c9ba3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -6
app.py CHANGED
@@ -196,13 +196,13 @@ def other():
196
  fbox3.append(f'{uid}-rembg/{i}.png')
197
  frame_num=f'Working on {i+1} of {frame_count}'
198
  yield fbox2,frame_num,None
 
199
  def make_gif():
200
-
201
  clip = VideoFileClip(f"{uid}-clip.mp4")
202
  clip.write_gif(f"{uid}/clip_gif.gif")
203
  out = f"{uid}/clip_gif.gif"
204
-
205
  return out,out
 
206
  def update_speed(inp,clip_speed,fps):
207
  if "-split.mp4" in inp:
208
  out_inp = f'{inp.split("-split.mp4",1)[0]}-split.mp4'
@@ -215,6 +215,7 @@ def update_speed(inp,clip_speed,fps):
215
  final.write_videofile(f'{out_inp}', fps=mod_fps)
216
  out = f'{out_inp}'
217
  return out,out
 
218
  with gr.Blocks() as app:
219
  with gr.Tab("Load"):
220
  with gr.Row():
@@ -242,7 +243,6 @@ with gr.Blocks() as app:
242
  with gr.Row():
243
  frame_btn = gr.Button("Get Frames")
244
  frame_stat=gr.Textbox(label="Status")
245
-
246
  with gr.Row():
247
  with gr.Column():
248
  frame_gal = gr.Gallery(columns=6)
@@ -251,9 +251,12 @@ with gr.Blocks() as app:
251
 
252
  with gr.Tab("GIF"):
253
  with gr.Row():
254
- gif_btn = gr.Button("Make GIF")
255
- gif_stat=gr.Textbox(label="Status")
256
-
 
 
 
257
  with gr.Row():
258
  with gr.Column():
259
  gif_show = gr.Video()
 
196
  fbox3.append(f'{uid}-rembg/{i}.png')
197
  frame_num=f'Working on {i+1} of {frame_count}'
198
  yield fbox2,frame_num,None
199
+
200
  def make_gif():
 
201
  clip = VideoFileClip(f"{uid}-clip.mp4")
202
  clip.write_gif(f"{uid}/clip_gif.gif")
203
  out = f"{uid}/clip_gif.gif"
 
204
  return out,out
205
+
206
  def update_speed(inp,clip_speed,fps):
207
  if "-split.mp4" in inp:
208
  out_inp = f'{inp.split("-split.mp4",1)[0]}-split.mp4'
 
215
  final.write_videofile(f'{out_inp}', fps=mod_fps)
216
  out = f'{out_inp}'
217
  return out,out
218
+
219
  with gr.Blocks() as app:
220
  with gr.Tab("Load"):
221
  with gr.Row():
 
243
  with gr.Row():
244
  frame_btn = gr.Button("Get Frames")
245
  frame_stat=gr.Textbox(label="Status")
 
246
  with gr.Row():
247
  with gr.Column():
248
  frame_gal = gr.Gallery(columns=6)
 
251
 
252
  with gr.Tab("GIF"):
253
  with gr.Row():
254
+ with gr.Column():
255
+ with gr.Row():
256
+ check_qual=gr.Checkbox(label="Improve Quality", value=False)
257
+ gif_btn = gr.Button("Make GIF")
258
+ with gr.Column():
259
+ gif_stat=gr.Textbox(label="Status")
260
  with gr.Row():
261
  with gr.Column():
262
  gif_show = gr.Video()