yerang commited on
Commit
6ba2521
1 Parent(s): 5a6eabc

Update app_.py

Browse files
Files changed (1) hide show
  1. app_.py +6 -1
app_.py CHANGED
@@ -152,6 +152,11 @@ def gpu_wrapped_execute_video(*args, **kwargs):
152
  def gpu_wrapped_execute_image(*args, **kwargs):
153
  return gradio_pipeline.execute_image(*args, **kwargs)
154
 
 
 
 
 
 
155
  def is_square_video(video_path):
156
  video = cv2.VideoCapture(video_path)
157
 
@@ -331,7 +336,7 @@ with gr.Blocks(theme=gr.themes.Soft()) as demo:
331
  )
332
 
333
  process_button_closelip.click(
334
- fn=gradio_pipeline.prepare_retargeting,
335
  inputs=image_input,
336
  outputs=image_input,
337
  show_progress=True
 
152
  def gpu_wrapped_execute_image(*args, **kwargs):
153
  return gradio_pipeline.execute_image(*args, **kwargs)
154
 
155
+ @spaces.GPU()
156
+ def gpu_wrapped_execute_retargeting(*args, **kwargs):
157
+ return gradio_pipeline.prepare_retargeting(*args, **kwargs)
158
+
159
+
160
  def is_square_video(video_path):
161
  video = cv2.VideoCapture(video_path)
162
 
 
336
  )
337
 
338
  process_button_closelip.click(
339
+ fn=gpu_wrapped_execute_retargeting,
340
  inputs=image_input,
341
  outputs=image_input,
342
  show_progress=True