Spaces:
Running
on
Zero
Send image to API without URL
Hello!,
I'm trying to use the Gradio API to send an image in buffer format, as described in the endpoint documentation. However, I haven't been able to get it to accept any of the listed file types (Blob | File | Buffer) except by using a URL. Am I missing something, or could there be an issue with the documentation? Is there a way to send the image directly, without relying on a URL—whether in base64, buffer, or another format?
Thank you very much for your help!
Hi
@TestingWhaaat
,unfortunetly gradio has a problem in the curl API, I have reported this to the gradio team at https://github.com/gradio-app/gradio/issues/9317 .
you can also check out the conversation at https://huggingface.co/spaces/not-lain/background-removal/discussions/8 to interact with other people facing the same problems and see if anyone has found a workaround.
Hi @not-lain ,
Thank you for your quick response. I’ve gone through the links you shared, but I’m not sure how they relate to my question. I had already read that to download an image, you need to add 'ce' to 'spa', and I don’t have any issues with downloading. However, my question isn’t about downloading an image but about uploading one.
As shown in the image from my previous message, the API indicates that it accepts (Blob | File | Buffer) as input, but only seems to accept a URL path to an image. My initial question was, how I can send the expected parameter—my image as a Blob or Buffer, or a base64 string?
Thank you!