import gradio as gr import requests url = "https://api.prodia.com/v1/faceswap" payload = { "sourceUrl": "body.png", "targetUrl": "face.png" } headers = { "accept": "application/json", "content-type": "application/json" } response = requests.post(url, json=payload, headers=headers) print(response.text) # Gradio Stuff def greet(name): return "Hello " + name + "!!" gr.Interface( fileUploadBody=gr.File(label="Upload Body Picture", type="filepath"), fileUploadFace=gr.File(label="Upload Face Picture", type="filepath"), ).launch()