from gradio_client import Client, handle_file client = Client("not-lain/background-removal") result = client.predict( f=handle_file('https://raw.githubusercontent.com/gradio-app/gradio/main/test/test_files/bus.png'), api_name="/png" ) print(result)