fix target_path undefined

This commit is contained in:
Somdev Sangwan 2023-05-31 14:43:21 +05:30 committed by GitHub
parent a8317003a8
commit ef28e3ad7f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

3
run.py
View File

@ -179,7 +179,8 @@ def start():
print("\n[WARNING] Please select a video/image to swap face in.") print("\n[WARNING] Please select a video/image to swap face in.")
return return
if not args['output_file']: if not args['output_file']:
args['output_file'] = rreplace(args['target_path'], "/", "/swapped-", 1) if "/" in target_path else "swapped-" + target_path target_path = args['target_path']
args['output_file'] = rreplace(target_path, "/", "/swapped-", 1) if "/" in target_path else "swapped-" + target_path
global pool global pool
pool = mp.Pool(args['cores_count']) pool = mp.Pool(args['cores_count'])
target_path = args['target_path'] target_path = args['target_path']