Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated.
Releases
@gradio/client@1.0.0
Highlights
Clients 1.0 Launch! (#8468
7cc0a0c
)We're excited to unveil the first major release of the Gradio clients.
We've made it even easier to turn any Gradio application into a production endpoint thanks to the clients' ergonomic, transparent, and portable design.
Ergonomic API 💆
Stream From a Gradio app in 5 lines
Use the
submit
method to get a job you can iterate over:Use the same keyword arguments as the app
Better Error Messages
If something goes wrong in the upstream app, the client will raise the same exception as the app provided that
show_error=True
in the original app'slaunch()
function, or it's agr.Error
exception.Transparent Design 🪟
Anything you can do in the UI, you can do with the client:
Here's an example showing how to display the queue position of a pending job:
Portable Design ⛺️
The client can run from pretty much any python and javascript environment (node, deno, the browser, Service Workers).
Here's an example using the client from a Flask server using gevent:
1.0 Migration Guide and Breaking Changes
Python
serialize
argument of theClient
class was removed. Has no effect.upload_files
argument of theClient
was removed.handle_file
method. Example:output_dir
argument was removed. It is not specified in thedownload_files
argument.Javascript
The client has been redesigned entirely. It was refactored from a function into a class. An instance can now be constructed by awaiting the
connect
method.The app variable has the same methods as the python class (
submit
,predict
,view_api
,duplicate
).Additional Changes
#8243 - Set orig_name in python client file uploads.
#8264 - Make exceptions in the Client more specific.
#8247 - Fix api recorder.
#8276 - Fix bug where client could not connect to apps that had self signed certificates.
#8245 - Cancel server progress from the python client.
#8200 - Support custom components in gr.load
#8182 - Convert sse calls in client from async to sync.
#7732 - Adds support for kwargs and default arguments in the python client, and improves how parameter information is displayed in the "view API" page.
#7888 - Cache view_api info in server and python client.
#7575 - Files should now be supplied as
file(...)
in the Client, and some fixes togr.load()
as well.#8401 - Add CDN installation to JS docs.
#8299 - Allow JS Client to work with authenticated spaces 🍪.
#8408 - Connect heartbeat if state created in render. Also fix config cleanup bug Connect heartbeat if state created in render. Also fix config cleanup bug #8407.
#8258 - Improve URL handling in JS Client.
#8322 - ensure the client correctly handles all binary data.
#8296 - always create a jwt when connecting to a space if a hf_token is present.
#8285 - use the correct query param to pass the jwt to the heartbeat event.
#8272 - ensure client works for private spaces.
#8197 - Add support for passing keyword args to
data
in JS client.#8252 - Client node fix.
#8209 - Rename
eventSource_Factory
andfetch_implementation
.#8109 - Implement JS Client tests.
#8211 - remove redundant event source logic.
#8179 - rework upload to be a class method + pass client into each component.
#8181 - Ensure connectivity to private HF spaces with SSE protocol.
#8169 - Only connect to heartbeat if needed.
#8118 - Add eventsource polyfill for Node.js and browser environments.
#7646 - Refactor JS Client.
#7974 - Fix heartbeat in the js client to be Lite compatible.
#7926 - Fixes streaming event race condition.
Thanks @freddyaboulton!
Features
48eeea4
- Refactor Cancelling Logic To Use /cancel. Thanks @freddyaboulton!Fixes
d5a9604
- Fix js client bundle. Thanks @pngwn!9d2d605
- Change client submit API to be an AsyncIterable and support more platforms. Thanks @pngwn!6447dfa
- Improve file handling in JS Client. Thanks @hannahblair!63d36fb
- Handle gradio apps usingstate
in the JS Client. Thanks @hannahblair!gradio_client@1.0.0
Highlights
Clients 1.0 Launch! (#8468
7cc0a0c
)We're excited to unveil the first major release of the Gradio clients.
We've made it even easier to turn any Gradio application into a production endpoint thanks to the clients' ergonomic, transparent, and portable design.
Ergonomic API 💆
Stream From a Gradio app in 5 lines
Use the
submit
method to get a job you can iterate over:Use the same keyword arguments as the app
Better Error Messages
If something goes wrong in the upstream app, the client will raise the same exception as the app provided that
show_error=True
in the original app'slaunch()
function, or it's agr.Error
exception.Transparent Design 🪟
Anything you can do in the UI, you can do with the client:
Here's an example showing how to display the queue position of a pending job:
Portable Design ⛺️
The client can run from pretty much any python and javascript environment (node, deno, the browser, Service Workers).
Here's an example using the client from a Flask server using gevent:
1.0 Migration Guide and Breaking Changes
Python
serialize
argument of theClient
class was removed. Has no effect.upload_files
argument of theClient
was removed.handle_file
method. Example:output_dir
argument was removed. It is not specified in thedownload_files
argument.Javascript
The client has been redesigned entirely. It was refactored from a function into a class. An instance can now be constructed by awaiting the
connect
method.The app variable has the same methods as the python class (
submit
,predict
,view_api
,duplicate
).Additional Changes
#8243 - Set orig_name in python client file uploads.
#8264 - Make exceptions in the Client more specific.
#8247 - Fix api recorder.
#8276 - Fix bug where client could not connect to apps that had self signed certificates.
#8245 - Cancel server progress from the python client.
#8200 - Support custom components in gr.load
#8182 - Convert sse calls in client from async to sync.
#7732 - Adds support for kwargs and default arguments in the python client, and improves how parameter information is displayed in the "view API" page.
#7888 - Cache view_api info in server and python client.
#7575 - Files should now be supplied as
file(...)
in the Client, and some fixes togr.load()
as well.#8401 - Add CDN installation to JS docs.
#8299 - Allow JS Client to work with authenticated spaces 🍪.
#8408 - Connect heartbeat if state created in render. Also fix config cleanup bug Connect heartbeat if state created in render. Also fix config cleanup bug #8407.
#8258 - Improve URL handling in JS Client.
#8322 - ensure the client correctly handles all binary data.
#8296 - always create a jwt when connecting to a space if a hf_token is present.
#8285 - use the correct query param to pass the jwt to the heartbeat event.
#8272 - ensure client works for private spaces.
#8197 - Add support for passing keyword args to
data
in JS client.#8252 - Client node fix.
#8209 - Rename
eventSource_Factory
andfetch_implementation
.#8109 - Implement JS Client tests.
#8211 - remove redundant event source logic.
#8179 - rework upload to be a class method + pass client into each component.
#8181 - Ensure connectivity to private HF spaces with SSE protocol.
#8169 - Only connect to heartbeat if needed.
#8118 - Add eventsource polyfill for Node.js and browser environments.
#7646 - Refactor JS Client.
#7974 - Fix heartbeat in the js client to be Lite compatible.
#7926 - Fixes streaming event race condition.
Thanks @freddyaboulton!
Features
2cd02ff
- Remove deprecated parameters from Python Client. Thanks @abidlabs!gradio@4.34.0
Features
48eeea4
- Refactor Cancelling Logic To Use /cancel. Thanks @freddyaboulton!8628899
- Support Bash in Api Recorder. Thanks @aliabd!96d8de2
- add delete event toFile
component. Thanks @pngwn!2cd02ff
- Remove deprecated parameters from Python Client. Thanks @abidlabs!8ca93d4
- Improve design of api recorder. Thanks @aliabd!5c8915b
- Add cURL to view API Page and add a dedicated Guide. Thanks @abidlabs!Fixes
d5a9604
- Fix js client bundle. Thanks @pngwn!9d2d605
- Change client submit API to be an AsyncIterable and support more platforms. Thanks @pngwn!6447dfa
- Improve file handling in JS Client. Thanks @hannahblair!63d36fb
- Handle gradio apps usingstate
in the JS Client. Thanks @hannahblair!@gradio/audio@0.11.8
Dependency updates
@gradio/button@0.2.41
Dependency updates
@gradio/chatbot@0.10.9
Dependency updates
@gradio/code@0.6.9
Dependency updates
@gradio/dataframe@0.8.8
Dependency updates
@gradio/dataset@0.1.41
Dependency updates
@gradio/downloadbutton@0.1.18
Dependency updates
@gradio/file@0.8.0
Features
96d8de2
- add delete event toFile
component. Thanks @pngwn!Fixes
9d2d605
- Change client submit API to be an AsyncIterable and support more platforms. Thanks @pngwn!Dependency updates
@gradio/gallery@0.10.8
Dependency updates
@gradio/image@0.11.8
Dependency updates
@gradio/imageeditor@0.7.8
Dependency updates
@gradio/lite@4.34.0
Dependency updates
@gradio/model3d@0.10.8
Dependency updates
@gradio/multimodaltextbox@0.4.9
Dependency updates
@gradio/preview@0.9.1
Fixes
63d36fb
- Handle gradio apps usingstate
in the JS Client. Thanks @hannahblair!@gradio/simpleimage@0.5.8
Dependency updates
@gradio/tootils@0.5.0
Features
96d8de2
- add delete event toFile
component. Thanks @pngwn!Dependency updates
@gradio/upload@0.11.0
Features
96d8de2
- add delete event toFile
component. Thanks @pngwn!Dependency updates
@gradio/uploadbutton@0.6.9
Dependency updates
@gradio/video@0.8.8
Dependency updates
website@0.31.3
Features
a9e6595
- Tweak meta titles and descriptions for clients. Thanks @aliabd!Dependency updates
@gradio/annotatedimage@0.6.8
Dependency updates
@gradio/app@1.36.0
Features
48eeea4
- Refactor Cancelling Logic To Use /cancel. Thanks @freddyaboulton!8628899
- Support Bash in Api Recorder. Thanks @aliabd!2cd02ff
- Remove deprecated parameters from Python Client. Thanks @abidlabs!8ca93d4
- Improve design of api recorder. Thanks @aliabd!5c8915b
- Add cURL to view API Page and add a dedicated Guide. Thanks @abidlabs!Fixes
9d2d605
- Change client submit API to be an AsyncIterable and support more platforms. Thanks @pngwn!63d36fb
- Handle gradio apps usingstate
in the JS Client. Thanks @hannahblair!Dependency updates
@gradio/fileexplorer@0.4.9
Dependency updates