File size: 717 Bytes
0d1e8ac
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
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)