Sartc commited on
Commit
fc840c7
·
verified ·
1 Parent(s): 67386d5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -3
app.py CHANGED
@@ -1,8 +1,8 @@
1
  import gradio as gr
2
  from face_parsing import integration_with_meme
3
 
4
- def replace_face(person_image, face_x, face_y, face_width, face_height):
5
- result_image = integration_with_meme(input_img_path=person_image, face_x=face_x, face_y=face_y, face_width=face_width, face_height=face_height)
6
  return result_image
7
 
8
  interface = gr.Interface(
@@ -13,11 +13,12 @@ interface = gr.Interface(
13
  gr.Slider(0, 500, 40, step=1, label="Face Y Coordinate"),
14
  gr.Slider(10, 200, 100, step=1, label="Face Width"),
15
  gr.Slider(10, 200, 100, step=1, label="Face Height"),
 
16
  ],
17
  outputs=gr.Image(type="pil", label="Result Image"),
18
  allow_flagging="never",
19
  title="Chill Guy Maker!",
20
- description="Upload your image, adjust the face coordinates, and become a chill guy."
21
  )
22
 
23
  with interface:
 
1
  import gradio as gr
2
  from face_parsing import integration_with_meme
3
 
4
+ def replace_face(person_image, face_x, face_y, face_width, face_height, flip):
5
+ result_image = integration_with_meme(input_img_path=person_image, face_x=face_x, face_y=face_y, face_width=face_width, face_height=face_height, flip=flip)
6
  return result_image
7
 
8
  interface = gr.Interface(
 
13
  gr.Slider(0, 500, 40, step=1, label="Face Y Coordinate"),
14
  gr.Slider(10, 200, 100, step=1, label="Face Width"),
15
  gr.Slider(10, 200, 100, step=1, label="Face Height"),
16
+ gr.Checkbox(label="Flip Person Image Horizontally"),
17
  ],
18
  outputs=gr.Image(type="pil", label="Result Image"),
19
  allow_flagging="never",
20
  title="Chill Guy Maker!",
21
+ description="Upload your image, adjust the face coordinates, and become a chill guy. Upload your image, adjust the face coordinates, and become a chill guy. Check the project readme for more information: https://github.com/sartq333/chill-guy-maker/blob/main/README.md"
22
  )
23
 
24
  with interface: