import gradio as gr from roop import run_face_swap def swap(source_img, target_file): output_path = run_face_swap(source_img, target_file) return output_path iface = gr.Interface( fn=swap, inputs=[ gr.Image(label="Upload Face Image (face.png)"), gr.File(label="Upload Target Image/Video (target.jpg / target.mp4)") ], outputs=gr.Video(label="Swapped Output"), title="AI Face Swap (Image + Video)", description="Upload your face and a target (image or video) to get a realistic face swapped result. Powered by Roop." ) iface.launch()