Spaces:
Runtime error
Runtime error
Lucas Hansen
commited on
Commit
•
97cab1f
1
Parent(s):
2d0cbc0
Update simple.py
Browse files
simple.py
CHANGED
@@ -53,22 +53,23 @@ def swap_faces(source_image_path, target_image_path, enhance_face=True, enhance_
|
|
53 |
|
54 |
return Image.open(output_image_path)
|
55 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
56 |
if __name__ == "__main__":
|
57 |
-
demo = gr.Interface(
|
58 |
-
fn=swap_faces,
|
59 |
-
inputs=[
|
60 |
-
gr.Image(type="filepath"),
|
61 |
-
gr.Image(type="filepath"),
|
62 |
-
gr.Checkbox(label="Enhance Face", value=True),
|
63 |
-
gr.Checkbox(label="Enhance Frame", value=True),
|
64 |
-
],
|
65 |
-
outputs=[
|
66 |
-
gr.Image(
|
67 |
-
type="pil",
|
68 |
-
show_download_button=True,
|
69 |
-
)
|
70 |
-
],
|
71 |
-
title="Swap Faces",
|
72 |
-
allow_flagging="never"
|
73 |
-
)
|
74 |
demo.launch()
|
|
|
53 |
|
54 |
return Image.open(output_image_path)
|
55 |
|
56 |
+
demo = gr.Interface(
|
57 |
+
fn=swap_faces,
|
58 |
+
inputs=[
|
59 |
+
gr.Image(type="filepath"),
|
60 |
+
gr.Image(type="filepath"),
|
61 |
+
gr.Checkbox(label="Enhance Face", value=True),
|
62 |
+
gr.Checkbox(label="Enhance Frame", value=True),
|
63 |
+
],
|
64 |
+
outputs=[
|
65 |
+
gr.Image(
|
66 |
+
type="pil",
|
67 |
+
show_download_button=True,
|
68 |
+
)
|
69 |
+
],
|
70 |
+
title="Swap Faces",
|
71 |
+
allow_flagging="never"
|
72 |
+
)
|
73 |
+
|
74 |
if __name__ == "__main__":
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
75 |
demo.launch()
|