Using HF spaces via http request?

I want to use a gradio space hosted on HF with a http request. I am very much aware of the super simple python, js and bash integration, however I am not working in these languages.

Is this possible, or am I stuck with having to use one of these other options?

1 Like

I heard that curl can be used, but isn’t it more difficult than Python?
The get/post request contents of the Python code that uses the requests library are mostly raw, so I think it can be used for curl as well.

It is more difficult than python, but when not working in these specific languages, one must go with the slightly more difficult alternative.
In other words, I am willing to give up ease of use to not use python.

I see. If you want to use it in a compiled language, for example, you can handle it in a more complicated way.

For HF, the easiest way is to use InferenceClient with Python or JS, but if that’s not possible, the next best thing is an API that returns JSON.
I heard that everyone used this before InferenceClient was developed, so there should be a lot that can be done, but because of that history, there is a lot of pre-2023 information. Well, it’s still in use inside old Gradio and so on, and it should work.