caracara / fn_index.py
LuisFlow's picture
Upload fn_index.py
0d1e8ac
raw
history blame contribute delete
717 Bytes
from gradio_client import Client
client = Client("https://felixrosberg-face-swap.hf.space/")
result = client.predict(
"https://raw.githubusercontent.com/gradio-app/gradio/main/test/test_files/bus.png", # str (filepath or URL to image) in 'Target' Image component
"https://raw.githubusercontent.com/gradio-app/gradio/main/test/test_files/bus.png", # str (filepath or URL to image) in 'Source' Image component
0, # int | float (numeric value between 0 and 100) in 'Anonymization ratio (%)' Slider component
0, # int | float (numeric value between 0 and 100) in 'Adversarial defense ratio (%)' Slider component
"Compare", # List[str] in 'Mode' Checkboxgroup component
fn_index=1
)
print(result)