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
29.84k stars 2.22k forks source link

`Edge` runtime compatable javascript client or REST API docs #8326

Closed sheey11 closed 2 weeks ago

sheey11 commented 2 weeks ago

Is your feature request related to a problem? Please describe.
I'm building a Cloudflare worker that needs to call the Gradio API. But Cloudflare uses edge as a javascript runtime, and it doesn't support nodejs modules like fs, os, stream, etc. that ws depends on, therefore I cannot use @gradio/client.

Describe the solution you'd like
Since Cloudflare implements its own WebSocket client, it would be great if there are any docs about REST API, so I can implement client in my own.

sheey11 commented 2 weeks ago

https://github.com/gradio-app/gradio/issues/4932#issuecomment-2103060264
This helps.