Spaces:
Running
Running
victorisgeek
commited on
Commit
•
2c09e8e
1
Parent(s):
278b6f5
Update app.py
Browse files
app.py
CHANGED
@@ -42,9 +42,9 @@ def main():
|
|
42 |
args = parse_args()
|
43 |
|
44 |
with gr.Blocks(title='FaceClone') as web_ui:
|
45 |
-
gr.Markdown('#
|
46 |
-
with gr.Tab('
|
47 |
-
gr.Markdown('### 🧸FaceClone
|
48 |
with gr.Tab('📥Image'):
|
49 |
with gr.Row():
|
50 |
with gr.Column():
|
@@ -63,7 +63,7 @@ def main():
|
|
63 |
with gr.Column():
|
64 |
output_image = gr.Image(type='filepath')
|
65 |
use_enhancer = gr.Checkbox(
|
66 |
-
label="👑face enhance",
|
67 |
info="🧿Whether use face enhance model.")
|
68 |
with gr.Row():
|
69 |
use_sr = gr.Checkbox(
|
@@ -87,39 +87,39 @@ def main():
|
|
87 |
outputs=[output_image],
|
88 |
api_name='🔎image swap')
|
89 |
|
90 |
-
with gr.Tab('🖥️Video'):
|
91 |
with gr.Row():
|
92 |
with gr.Column():
|
93 |
-
gr.Markdown('
|
94 |
video_input = gr.Video()
|
95 |
with gr.Row():
|
96 |
with gr.Column():
|
97 |
gr.Markdown(
|
98 |
-
'
|
99 |
dst_face_image = gr.Image(type='filepath')
|
100 |
with gr.Column():
|
101 |
gr.Markdown(
|
102 |
-
'
|
103 |
src_face_image = gr.Image(type='filepath')
|
104 |
|
105 |
with gr.Column():
|
106 |
output_video = gr.Video()
|
107 |
use_enhancer = gr.Checkbox(
|
108 |
-
label="📸
|
109 |
info="📷Whether use face enhance model.")
|
110 |
with gr.Row():
|
111 |
use_sr = gr.Checkbox(
|
112 |
-
label="🔋
|
113 |
info="🔦Whether use image resolution model.")
|
114 |
scale = gr.Number(
|
115 |
-
value=1, label='🗞️
|
116 |
with gr.Row():
|
117 |
face_sim_thre = gr.Number(
|
118 |
value=0.6,
|
119 |
label='💌face similarity threshold',
|
120 |
minimum=0.0,
|
121 |
maximum=1.0)
|
122 |
-
convert_button = gr.Button('
|
123 |
convert_button.click(fn=swap_face,
|
124 |
inputs=[
|
125 |
video_input, dst_face_image,
|
@@ -127,11 +127,11 @@ def main():
|
|
127 |
use_sr, scale, face_sim_thre
|
128 |
],
|
129 |
outputs=[output_video],
|
130 |
-
api_name='
|
131 |
|
132 |
-
with gr.Tab('
|
133 |
-
gr.Markdown('### 🧸FaceClone
|
134 |
-
with gr.Tab('📷Image'):
|
135 |
with gr.Row():
|
136 |
with gr.Column():
|
137 |
gr.Markdown('🧑🦳The source image to be swapped')
|
@@ -142,22 +142,22 @@ def main():
|
|
142 |
with gr.Column():
|
143 |
output_image = gr.Image(type='filepath')
|
144 |
use_enhancer = gr.Checkbox(
|
145 |
-
label="👑
|
146 |
info="🧾Whether use face enhance model.")
|
147 |
with gr.Row():
|
148 |
use_sr = gr.Checkbox(
|
149 |
-
label="🛠️
|
150 |
info="⌛Whether use image resolution model.")
|
151 |
scale = gr.Number(
|
152 |
-
value=1, label='📸
|
153 |
-
convert_button = gr.Button('
|
154 |
convert_button.click(fn=swap_pose,
|
155 |
inputs=[
|
156 |
image_input, target,
|
157 |
use_enhancer, use_sr, scale
|
158 |
],
|
159 |
outputs=[output_image],
|
160 |
-
api_name='🎭image swap')
|
161 |
|
162 |
# with gr.Tab('Video'):
|
163 |
# with gr.Row():
|
|
|
42 |
args = parse_args()
|
43 |
|
44 |
with gr.Blocks(title='FaceClone') as web_ui:
|
45 |
+
gr.Markdown('# 🇲🇲FaceClone🇲🇲Deepfake Swap Face and Pose')
|
46 |
+
with gr.Tab('### 🧩 FaceSwapper'):
|
47 |
+
gr.Markdown('### 🧸FaceClone:power by Gradio')
|
48 |
with gr.Tab('📥Image'):
|
49 |
with gr.Row():
|
50 |
with gr.Column():
|
|
|
63 |
with gr.Column():
|
64 |
output_image = gr.Image(type='filepath')
|
65 |
use_enhancer = gr.Checkbox(
|
66 |
+
label="👑 face enhance",
|
67 |
info="🧿Whether use face enhance model.")
|
68 |
with gr.Row():
|
69 |
use_sr = gr.Checkbox(
|
|
|
87 |
outputs=[output_image],
|
88 |
api_name='🔎image swap')
|
89 |
|
90 |
+
with gr.Tab('🖥️ Video'):
|
91 |
with gr.Row():
|
92 |
with gr.Column():
|
93 |
+
gr.Markdown('📺 Target Video')
|
94 |
video_input = gr.Video()
|
95 |
with gr.Row():
|
96 |
with gr.Column():
|
97 |
gr.Markdown(
|
98 |
+
'👳 Target Face')
|
99 |
dst_face_image = gr.Image(type='filepath')
|
100 |
with gr.Column():
|
101 |
gr.Markdown(
|
102 |
+
'🫅 Source Face')
|
103 |
src_face_image = gr.Image(type='filepath')
|
104 |
|
105 |
with gr.Column():
|
106 |
output_video = gr.Video()
|
107 |
use_enhancer = gr.Checkbox(
|
108 |
+
label="📸 Face Enhance",
|
109 |
info="📷Whether use face enhance model.")
|
110 |
with gr.Row():
|
111 |
use_sr = gr.Checkbox(
|
112 |
+
label="🔋 Super resolution",
|
113 |
info="🔦Whether use image resolution model.")
|
114 |
scale = gr.Number(
|
115 |
+
value=1, label='🗞️ Super resolution Image')
|
116 |
with gr.Row():
|
117 |
face_sim_thre = gr.Number(
|
118 |
value=0.6,
|
119 |
label='💌face similarity threshold',
|
120 |
minimum=0.0,
|
121 |
maximum=1.0)
|
122 |
+
convert_button = gr.Button('🎯 Swap')
|
123 |
convert_button.click(fn=swap_face,
|
124 |
inputs=[
|
125 |
video_input, dst_face_image,
|
|
|
127 |
use_sr, scale, face_sim_thre
|
128 |
],
|
129 |
outputs=[output_video],
|
130 |
+
api_name='💽 video swap 💽')
|
131 |
|
132 |
+
with gr.Tab('### 🪩 PoseSwapper'):
|
133 |
+
gr.Markdown('### 🧸FaceClone:Deepfake power by Gradio')
|
134 |
+
with gr.Tab('📷 Image'):
|
135 |
with gr.Row():
|
136 |
with gr.Column():
|
137 |
gr.Markdown('🧑🦳The source image to be swapped')
|
|
|
142 |
with gr.Column():
|
143 |
output_image = gr.Image(type='filepath')
|
144 |
use_enhancer = gr.Checkbox(
|
145 |
+
label="👑 Face Enhance",
|
146 |
info="🧾Whether use face enhance model.")
|
147 |
with gr.Row():
|
148 |
use_sr = gr.Checkbox(
|
149 |
+
label="🛠️ Super Resolution",
|
150 |
info="⌛Whether use image resolution model.")
|
151 |
scale = gr.Number(
|
152 |
+
value=1, label='📸 slSuper resolution scale')
|
153 |
+
convert_button = gr.Button('🎯 Swap')
|
154 |
convert_button.click(fn=swap_pose,
|
155 |
inputs=[
|
156 |
image_input, target,
|
157 |
use_enhancer, use_sr, scale
|
158 |
],
|
159 |
outputs=[output_image],
|
160 |
+
api_name='🎭 image swap 🎭')
|
161 |
|
162 |
# with gr.Tab('Video'):
|
163 |
# with gr.Row():
|