gradio-app / gradio

Build and share delightful machine learning apps, all in Python. 🌟 Star to support our work!
http://www.gradio.app
Apache License 2.0
31.25k stars 2.33k forks source link

Write a "Gradio Client Library Guidelines" document to explain how to implement a client in language agnostic terms. #6360

Open denizsincar29 opened 8 months ago

denizsincar29 commented 8 months ago

Hello. How to interface with huggingface spaces from rust language? I have searched the web but couldn't find any solution. Thank you.

freddyaboulton commented 8 months ago

Not yet - would you like to write one? 😄 I actually had a thought about this earlier this week.

denizsincar29 commented 8 months ago

@freddyaboulton well, haha, if serious, is it difficult to write one? or the api is simple enough?

denizsincar29 commented 8 months ago

@freddyaboulton well, if serious, how to interract via rest api or other ways?

freddyaboulton commented 8 months ago

Sorry I thought I had responded to this. I think we should write a "Gradio Client Library Guidelines" document to explain how to implement a client in language agnostic terms.

The main things are:

Internally the client would stream results from the sse endpoint. See the python function here

JacobLinCool commented 6 days ago

Hello, I've made the Gradio client in Rust according to @freddyaboulton's guidelines. I've tested it with some HuggingFace Spaces such as stabilityai/stable-diffusion-3-medium and hf-audio/whisper-large-v3. I would like other Rust developers to test it out and give some feedbacks!

https://github.com/JacobLinCool/gradio-rs

freddyaboulton commented 5 days ago

Wow very cool! Would love to amplify in our socials if that's ok