Api don't work!
when I run that python code, I get an error:
Loaded as API: https://huggingface-projects-qr-code-ai-art-generator--5c578vvpb.hf.space/ ✔
Traceback (most recent call last):
File "C:\Users\ADMIN\PycharmProjects\Linq-to-QR\website.py", line 4, in
result = client.predict(
File "C:\Users\ADMIN\PycharmProjects\Linq-to-QR\venv\lib\site-packages\gradio_client\client.py", line 263, in predict
return self.submit(*args, api_name=api_name, fn_index=fn_index).result()
File "C:\Users\ADMIN\PycharmProjects\Linq-to-QR\venv\lib\site-packages\gradio_client\client.py", line 954, in result
raise self.future._exception # type: ignore
File "C:\Users\ADMIN\AppData\Local\Programs\Python\Python38\lib\concurrent\futures\thread.py", line 57, in run
result = self.fn(*self.args, **self.kwargs)
File "C:\Users\ADMIN\PycharmProjects\Linq-to-QR\venv\lib\site-packages\gradio_client\client.py", line 622, in _inner
predictions = _predict(*data)
File "C:\Users\ADMIN\PycharmProjects\Linq-to-QR\venv\lib\site-packages\gradio_client\client.py", line 653, in _predict
raise ValueError(result["error"])
ValueError: None
Process finished with exit code 1
Here is the code I pasted:
from gradio_client import Client
client = Client("https://huggingface-projects-qr-code-ai-art-generator--5c578vvpb.hf.space/")
result = client.predict(
"", # str in 'QR Code Content' Textbox component
"Howdy!", # str in 'Prompt' Textbox component
"Howdy!", # str in 'Negative Prompt' Textbox component
0, # int | float (numeric value between 0.0 and 50.0) in 'Guidance Scale' Slider component
0, # int | float (numeric value between 0.0 and 5.0) in 'Controlnet Conditioning Scale' Slider component
0, # int | float (numeric value between 0.0 and 1.0) in 'Strength' Slider component
-1, # int | float (numeric value between -1 and 9999999999) in 'Seed' Slider component
"https://raw.githubusercontent.com/gradio-app/gradio/main/test/test_files/bus.png", # str (filepath or URL to image) in 'Init Image (Optional). Leave blank to generate image with SD 2.1' Image component
"https://raw.githubusercontent.com/gradio-app/gradio/main/test/test_files/bus.png", # str (filepath or URL to image) in 'QR Code Image (Optional). Leave blank to automatically generate QR code' Image component
True, # bool in 'Use QR code as init image' Checkbox component
"DPM++ Karras SDE", # str (Option from: ['DPM++ Karras SDE', 'DPM++ Karras', 'Heun', 'Euler', 'DDIM', 'DEIS']) in 'Sampler' Dropdown component
fn_index=0
)
print(result)
Yeah, it doesn't for me too