github gradio-app/gradio @gradio/upload@0.9.0

latest releases: @gradio/lite@4.32.2, @gradio/app@1.35.8, gradio@4.32.2...
one month ago

Highlights

Setting File Upload Limits (#7909 2afca65)

We have added a max_file_size size parameter to launch() that limits to size of files uploaded to the server. This limit applies to each individual file. This parameter can be specified as a string or an integer (corresponding to the size in bytes).

The following code snippet sets a max file size of 5 megabytes.

import gradio as gr

demo = gr.Interface(lambda x: x, "image", "image")

demo.launch(max_file_size="5mb")
# or
demo.launch(max_file_size=5 * gr.FileSize.MB)

max_file_size_upload

Error states can now be cleared

When a component encounters an error, the error state shown in the UI can now be cleared by clicking on the x icon in the top right of the component. This applies to all types of errors, whether it's raised in the UI or the server.

error_modal_calculator

Thanks @freddyaboulton!

Dependency updates

  • @gradio/atoms@0.7.1
  • @gradio/client@0.17.0
  • @gradio/upload@0.9.0
  • @gradio/utils@0.4.0

Don't miss a new gradio release

NewReleases is sending notifications on new releases.