Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -66,19 +66,12 @@ def swap_face(source_file, target_file, doFaceEnhancer):
|
|
66 |
app = gr.Blocks()
|
67 |
|
68 |
with app:
|
69 |
-
|
70 |
-
target_image = gr.Image(label="Target Image")
|
71 |
-
face_enhancer = gr.Checkbox(label="Apply Enhancer?", info="Face Enhancer")
|
72 |
-
output_image = gr.Image(label="Output Image")
|
73 |
-
|
74 |
-
swap_button = gr.Button("Swap Faces")
|
75 |
-
swap_button.click(
|
76 |
fn=swap_face,
|
77 |
-
inputs=[
|
78 |
-
outputs=
|
|
|
|
|
79 |
)
|
80 |
|
81 |
-
app.launch(
|
82 |
-
description="Sorry for the inconvenience. The model is currently running on the CPU, which might affect performance. We appreciate your understanding.",
|
83 |
-
theme="NoCrypt/miku"
|
84 |
-
)
|
|
|
66 |
app = gr.Blocks()
|
67 |
|
68 |
with app:
|
69 |
+
gr.Interface(
|
|
|
|
|
|
|
|
|
|
|
|
|
70 |
fn=swap_face,
|
71 |
+
inputs=[gr.Image(label="Source Image"), gr.Image(label="Target Image"), gr.Checkbox(label="Apply Enhancer?", info="Face Enhancer")],
|
72 |
+
outputs=gr.Image(label="Output Image"),
|
73 |
+
description="Sorry for the inconvenience. The model is currently running on the CPU, which might affect performance. We appreciate your understanding.",
|
74 |
+
theme="NoCrypt/miku"
|
75 |
)
|
76 |
|
77 |
+
app.launch()
|
|
|
|
|
|