LuisFlow commited on
Commit
0d1e8ac
β€’
1 Parent(s): 37dd4e4

Upload fn_index.py

Browse files
Files changed (1) hide show
  1. fn_index.py +12 -0
fn_index.py ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from gradio_client import Client
2
+
3
+ client = Client("https://felixrosberg-face-swap.hf.space/")
4
+ result = client.predict(
5
+ "https://raw.githubusercontent.com/gradio-app/gradio/main/test/test_files/bus.png", # str (filepath or URL to image) in 'Target' Image component
6
+ "https://raw.githubusercontent.com/gradio-app/gradio/main/test/test_files/bus.png", # str (filepath or URL to image) in 'Source' Image component
7
+ 0, # int | float (numeric value between 0 and 100) in 'Anonymization ratio (%)' Slider component
8
+ 0, # int | float (numeric value between 0 and 100) in 'Adversarial defense ratio (%)' Slider component
9
+ "Compare", # List[str] in 'Mode' Checkboxgroup component
10
+ fn_index=1
11
+ )
12
+ print(result)