Ashrafb commited on
Commit
7c54a1a
·
1 Parent(s): eb230df

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
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" or mode == "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 == "Face Enhancer" or mode == "Both":
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