Update app.py
Browse files
app.py
CHANGED
@@ -29,18 +29,11 @@ def run_scripts(target, source, mode):
|
|
29 |
with open(f'temp/source{target_extension}', 'wb') as f:
|
30 |
f.write(source_bytes)
|
31 |
|
32 |
-
if mode
|
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 == "Face Enhancer":
|
37 |
-
cmd2 = ["python3", "run.py", "-t", f'temp/target{target_extension}', "-o", output_path, "--frame-processor", "face_enhancer"]
|
38 |
-
subprocess.run(cmd2)
|
39 |
-
|
40 |
-
if mode == "Both":
|
41 |
cmd1 = ["python3", "run.py", "-s", f'temp/source{target_extension}', "-t", f'temp/target{target_extension}', "-o", output_path, "--frame-processor", "face_swapper"]
|
42 |
subprocess.run(cmd1)
|
43 |
|
|
|
44 |
cmd2 = ["python3", "run.py", "-t", f'temp/target{target_extension}', "-o", output_path, "--frame-processor", "face_enhancer"]
|
45 |
subprocess.run(cmd2)
|
46 |
|
|
|
29 |
with open(f'temp/source{target_extension}', 'wb') as f:
|
30 |
f.write(source_bytes)
|
31 |
|
32 |
+
if mode in ["Face Swapper", "Both"]:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 in ["Face Enhancer", "Both"]:
|
37 |
cmd2 = ["python3", "run.py", "-t", f'temp/target{target_extension}', "-o", output_path, "--frame-processor", "face_enhancer"]
|
38 |
subprocess.run(cmd2)
|
39 |
|