anonymous commited on
Commit
502b7f3
1 Parent(s): cee2f21
Files changed (1) hide show
  1. app.py +13 -4
app.py CHANGED
@@ -274,6 +274,13 @@ def process(*args):
274
  return first_frame, keypath
275
 
276
 
 
 
 
 
 
 
 
277
  @torch.no_grad()
278
  def process1(*args):
279
 
@@ -853,10 +860,6 @@ with block:
853
  inner_strength, smooth_boundary
854
  ]
855
 
856
- gr.Examples(examples=args_list,
857
- inputs=[input_path, *ips],
858
- cache_examples=True)
859
-
860
  with gr.Column():
861
  result_image = gr.Image(label='Output first frame',
862
  type='numpy',
@@ -864,6 +867,12 @@ with block:
864
  result_keyframe = gr.Video(label='Output key frame video',
865
  format='mp4',
866
  interactive=False)
 
 
 
 
 
 
867
 
868
  def input_uploaded(path):
869
  frame_count = get_frame_count(path)
 
274
  return first_frame, keypath
275
 
276
 
277
+ @torch.no_grad()
278
+ def process0(*args):
279
+ global global_video_path
280
+ global_video_path = args[0]
281
+ return process(*args[1:])
282
+
283
+
284
  @torch.no_grad()
285
  def process1(*args):
286
 
 
860
  inner_strength, smooth_boundary
861
  ]
862
 
 
 
 
 
863
  with gr.Column():
864
  result_image = gr.Image(label='Output first frame',
865
  type='numpy',
 
867
  result_keyframe = gr.Video(label='Output key frame video',
868
  format='mp4',
869
  interactive=False)
870
+ with gr.Row():
871
+ gr.Examples(examples=args_list,
872
+ inputs=[input_path, *ips],
873
+ fn=process0,
874
+ outputs=[result_image, result_keyframe],
875
+ cache_examples=True)
876
 
877
  def input_uploaded(path):
878
  frame_count = get_frame_count(path)