Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
|
@@ -175,16 +175,16 @@ def create_interface():
|
|
| 175 |
with gr.Tab("📀 Swap Face Image"):
|
| 176 |
with gr.Row():
|
| 177 |
with gr.Column():
|
| 178 |
-
image_input = gr.Image(label='
|
| 179 |
with gr.Row():
|
| 180 |
-
analyze_button = gr.Button("
|
| 181 |
with gr.Row():
|
| 182 |
with gr.Column():
|
| 183 |
-
face_num = gr.Number(label='
|
| 184 |
-
face_index_num = gr.Number(label='
|
| 185 |
-
selected_face = gr.Image(label='
|
| 186 |
-
swap_face = gr.Image(label='
|
| 187 |
-
swap_button = gr.Button("
|
| 188 |
with gr.Column():
|
| 189 |
image_output = gr.Image(label='📤Output Image',interactive=False)
|
| 190 |
#text_output = gr.Textbox(placeholder="What is your name?")
|
|
@@ -195,19 +195,19 @@ def create_interface():
|
|
| 195 |
with gr.Row():
|
| 196 |
with gr.Column():
|
| 197 |
source_video = gr.Video()
|
| 198 |
-
video_info = gr.Textbox(label="
|
| 199 |
gr.Markdown("🛠️Select a frame for preview with the slider. Then select the face which should be swapped by clicking on it with the cursor")
|
| 200 |
-
video_position = gr.Slider(label="
|
| 201 |
-
frame_preview = gr.Image(label="
|
| 202 |
-
face_index = gr.Textbox(label="
|
| 203 |
with gr.Row():
|
| 204 |
-
dest_face_vid = gr.Image(label="👑Face to swap",interactive=True)
|
| 205 |
-
source_face_vid = gr.Image(label="
|
| 206 |
gr.Markdown("🔑The higher the tolerance the more likely a wrong face will be swapped. 30-40 is a good starting point.")
|
| 207 |
face_tolerance = gr.Slider(label="⏳Tolerance",value=40,interactive=True)
|
| 208 |
-
preview_video = gr.Button("
|
| 209 |
video_file_path = gr.Text(label="🗳️Output Video path incl. file.mp4 (when left empty it will be put in the gradio temp dir)")
|
| 210 |
-
process_video = gr.Button("
|
| 211 |
with gr.Column():
|
| 212 |
with gr.Column(scale=1):
|
| 213 |
image_output = gr.Image()
|
|
|
|
| 175 |
with gr.Tab("📀 Swap Face Image"):
|
| 176 |
with gr.Row():
|
| 177 |
with gr.Column():
|
| 178 |
+
image_input = gr.Image(label='🧑🦳 Target Face (🧩)', scale=0.5)
|
| 179 |
with gr.Row():
|
| 180 |
+
analyze_button = gr.Button("🕵️ Analyze")
|
| 181 |
with gr.Row():
|
| 182 |
with gr.Column():
|
| 183 |
+
face_num = gr.Number(label='🦋 Recognized Faces')
|
| 184 |
+
face_index_num = gr.Number(label='🍄 Face Index', precision=0)
|
| 185 |
+
selected_face = gr.Image(label='🫅 Source Face', interactive=False)
|
| 186 |
+
swap_face = gr.Image(label='☀️Swap Face')
|
| 187 |
+
swap_button = gr.Button("🧶 Swap")
|
| 188 |
with gr.Column():
|
| 189 |
image_output = gr.Image(label='📤Output Image',interactive=False)
|
| 190 |
#text_output = gr.Textbox(placeholder="What is your name?")
|
|
|
|
| 195 |
with gr.Row():
|
| 196 |
with gr.Column():
|
| 197 |
source_video = gr.Video()
|
| 198 |
+
video_info = gr.Textbox(label="💻 Video Information")
|
| 199 |
gr.Markdown("🛠️Select a frame for preview with the slider. Then select the face which should be swapped by clicking on it with the cursor")
|
| 200 |
+
video_position = gr.Slider(label="⛓️Frame preview",interactive=True)
|
| 201 |
+
frame_preview = gr.Image(label="🔗Frame preview")
|
| 202 |
+
face_index = gr.Textbox(label="⚙️ Face-Index",interactive=False)
|
| 203 |
with gr.Row():
|
| 204 |
+
dest_face_vid = gr.Image(label="👑 Face to swap",interactive=True)
|
| 205 |
+
source_face_vid = gr.Image(label="🎯 New Face")
|
| 206 |
gr.Markdown("🔑The higher the tolerance the more likely a wrong face will be swapped. 30-40 is a good starting point.")
|
| 207 |
face_tolerance = gr.Slider(label="⏳Tolerance",value=40,interactive=True)
|
| 208 |
+
preview_video = gr.Button("🎭 Preview")
|
| 209 |
video_file_path = gr.Text(label="🗳️Output Video path incl. file.mp4 (when left empty it will be put in the gradio temp dir)")
|
| 210 |
+
process_video = gr.Button("⚙️ Process")
|
| 211 |
with gr.Column():
|
| 212 |
with gr.Column(scale=1):
|
| 213 |
image_output = gr.Image()
|