Unable to inference from space in python using API

John6666
Sat, 26 Oct 2024 08:15:02 +0000

Your code is a bit wrong, but my local environment is Python 3.9, so I can’t try Gradio5…
Hope it works…

hf_token = "hf_********"
#client = Client("https://huggingface.co/spaces/jadechoghari/ferret-demo")
client = Client("jadechoghari/ferret-demo", hf_token=hf_token)

pip install gradio==5.1.0
pip install -U gradio-client