Update app.py
Browse files
app.py
CHANGED
@@ -29,11 +29,11 @@ def run_scripts(target, source, mode, use_face_enhancer):
|
|
29 |
with open(f'temp/source{target_extension}', 'wb') as f:
|
30 |
f.write(source_bytes)
|
31 |
|
32 |
-
if mode == "Face Swapper"
|
33 |
cmd1 = ["python3", "run.py", "-s", f'temp/source{target_extension}', "-t", f'temp/target{target_extension}', "-o", output_path, "--frame-processor", "face_swapper"]
|
34 |
subprocess.run(cmd1)
|
35 |
|
36 |
-
if mode
|
37 |
cmd2 = ["python3", "run.py", "-t", f'temp/target{target_extension}', "-o", output_path, "--frame-processor", "face_enhancer"]
|
38 |
subprocess.run(cmd2)
|
39 |
|
|
|
29 |
with open(f'temp/source{target_extension}', 'wb') as f:
|
30 |
f.write(source_bytes)
|
31 |
|
32 |
+
if mode == "Face Swapper":
|
33 |
cmd1 = ["python3", "run.py", "-s", f'temp/source{target_extension}', "-t", f'temp/target{target_extension}', "-o", output_path, "--frame-processor", "face_swapper"]
|
34 |
subprocess.run(cmd1)
|
35 |
|
36 |
+
if use_face_enhancer and mode != "Face Swapper":
|
37 |
cmd2 = ["python3", "run.py", "-t", f'temp/target{target_extension}', "-o", output_path, "--frame-processor", "face_enhancer"]
|
38 |
subprocess.run(cmd2)
|
39 |
|