Update app.py
Browse files
app.py
CHANGED
|
@@ -174,18 +174,18 @@ def swap_faces(target_files, male_file, female_file, enhancer_name="NONE"):
|
|
| 174 |
|
| 175 |
# ------------------------------ UI ------------------------------
|
| 176 |
with gr.Blocks() as demo:
|
| 177 |
-
gr.Markdown("## 🧑🦱➡👩
|
| 178 |
|
| 179 |
with gr.Row():
|
| 180 |
with gr.Column():
|
| 181 |
-
target_input = gr.Files(label="Files
|
| 182 |
-
male_input = gr.File(label="File
|
| 183 |
-
female_input = gr.File(label="File
|
| 184 |
enhancer = gr.Dropdown(ENHANCER_CHOICES, label="Face Enhancer", value="REAL-ESRGAN 2x")
|
| 185 |
run_btn = gr.Button("✨ Swap")
|
| 186 |
|
| 187 |
with gr.Column():
|
| 188 |
-
output_files = gr.Files(label="
|
| 189 |
|
| 190 |
def run_wrapper(target_files, male_file, female_file, enhancer_name):
|
| 191 |
out_files = swap_faces(target_files, male_file, female_file, enhancer_name)
|
|
|
|
| 174 |
|
| 175 |
# ------------------------------ UI ------------------------------
|
| 176 |
with gr.Blocks() as demo:
|
| 177 |
+
gr.Markdown("## 🧑🦱➡👩")
|
| 178 |
|
| 179 |
with gr.Row():
|
| 180 |
with gr.Column():
|
| 181 |
+
target_input = gr.Files(label="Files", file_types=[".jpg", ".jpeg", ".png", ".gif", ".bmp", ".tiff", ".webp"])
|
| 182 |
+
male_input = gr.File(label="File", file_types=[".jpg", ".jpeg", ".png", ".gif", ".bmp", ".tiff", ".webp"])
|
| 183 |
+
female_input = gr.File(label="File", file_types=[".jpg", ".jpeg", ".png", ".gif", ".bmp", ".tiff", ".webp"])
|
| 184 |
enhancer = gr.Dropdown(ENHANCER_CHOICES, label="Face Enhancer", value="REAL-ESRGAN 2x")
|
| 185 |
run_btn = gr.Button("✨ Swap")
|
| 186 |
|
| 187 |
with gr.Column():
|
| 188 |
+
output_files = gr.Files(label="files")
|
| 189 |
|
| 190 |
def run_wrapper(target_files, male_file, female_file, enhancer_name):
|
| 191 |
out_files = swap_faces(target_files, male_file, female_file, enhancer_name)
|