Update app.py
Browse files
app.py
CHANGED
|
@@ -14,9 +14,12 @@ def run_scripts(target, source, use_face_enhancer):
|
|
| 14 |
|
| 15 |
cmd1 = ["python3", "run.py", "-s", source.name, "-t", target_file.name, "-o", output_path1, "--frame-processor", "face_swapper","face_enhancer",'--many-faces']
|
| 16 |
subprocess.run(cmd1)
|
| 17 |
-
|
|
|
|
|
|
|
|
|
|
| 18 |
|
| 19 |
-
return
|
| 20 |
|
| 21 |
iface = gr.Interface(
|
| 22 |
fn=run_scripts,
|
|
|
|
| 14 |
|
| 15 |
cmd1 = ["python3", "run.py", "-s", source.name, "-t", target_file.name, "-o", output_path1, "--frame-processor", "face_swapper","face_enhancer",'--many-faces']
|
| 16 |
subprocess.run(cmd1)
|
| 17 |
+
# Mở ảnh đã được xử lý và thêm vào danh sách
|
| 18 |
+
output_image = Image.open(output_path1)
|
| 19 |
+
output_images.append(output_image)
|
| 20 |
+
#outputfile.append(output_path1)
|
| 21 |
|
| 22 |
+
return output_images
|
| 23 |
|
| 24 |
iface = gr.Interface(
|
| 25 |
fn=run_scripts,
|