Spaces:
Runtime error
Runtime error
Lucas Hansen
commited on
Commit
•
8c613a3
1
Parent(s):
ebcf521
Update simple.py
Browse files
simple.py
CHANGED
@@ -15,7 +15,8 @@ def run_cli(cli_args):
|
|
15 |
def swap_faces(source_image_path, target_image_path, enhance=True):
|
16 |
provider = 'cuda'
|
17 |
|
18 |
-
|
|
|
19 |
output_image_path = output_image_file.name
|
20 |
|
21 |
print(source_image_path)
|
|
|
15 |
def swap_faces(source_image_path, target_image_path, enhance=True):
|
16 |
provider = 'cuda'
|
17 |
|
18 |
+
target_ext = target_image_path.split('.')[-1]
|
19 |
+
output_image_file = tempfile.NamedTemporaryFile(suffix=f'.{target_ext}')
|
20 |
output_image_path = output_image_file.name
|
21 |
|
22 |
print(source_image_path)
|