FaceSwappa / app.py
theFisher86's picture
Update app.py
556e22a verified
raw
history blame
758 Bytes
import gradio as gr
import requests
#FaceSwap Stuff
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)
#Copilot Stuff
#import gradio as gr
# Define the Gradio interface
description = "Upload and download files"
title = "Upload and Download"
interface = gr.Interface(
fn=None, # We don't need a function for this example
BodyInput=gr.File(label="Upload Body Picture"),
FaceInput=gr.File(label="Upload Face Picture"),
title=title,
description=description
)
# Launch the Gradio app
interface.launch()