Spaces:
Running
Running
File size: 532 Bytes
657f39a cc9114e |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
import gradio as gr
import subprocess
def swap_faces(source_image, target_image):
command = [
"python", "infer.py",
"--source", source_image,
"--target", target_image,
"--output", "output.jpg"
]
subprocess.run(command)
return "output.jpg"
iface = gr.Interface(
fn=swap_faces,
inputs=["image", "image"],
outputs="image",
title="FaceFusion",
description="Upload two images and swap faces using FaceFusion."
)
iface.launch(server_name="0.0.0.0", server_port=7860)
|