multimodalart HF staff commited on
Commit
c8890b6
1 Parent(s): 293a1c7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -3
app.py CHANGED
@@ -35,9 +35,8 @@ from hair_swap import HairFast, get_parser
35
  hair_fast = HairFast(get_parser().parse_args([]))
36
 
37
  @spaces.GPU
38
- def swap_hair(source, target_1, target_2):
39
- result = hair_fast(face_img, shape_img, color_img)
40
- final_image = hair_fast.swap(face_path, shape_path, color_path)
41
  return T.functional.to_pil_image(final_image)
42
 
43
  with gr.Blocks() as demo:
 
35
  hair_fast = HairFast(get_parser().parse_args([]))
36
 
37
  @spaces.GPU
38
+ def swap_hair(source, target_1, target_2, progress=gr.Progress(track_tqdm=True)):
39
+ final_image = hair_fast.swap(source, target_1, target_2)
 
40
  return T.functional.to_pil_image(final_image)
41
 
42
  with gr.Blocks() as demo: