gradio/.changeset/tiny-cars-spend.md
2024-04-19 20:30:51 -04:00

2.0 KiB

@gradio/app @gradio/audio @gradio/chatbot @gradio/checkbox @gradio/checkboxgroup @gradio/client @gradio/code @gradio/colorpicker @gradio/dataframe @gradio/dropdown @gradio/fallback @gradio/file @gradio/fileexplorer @gradio/gallery @gradio/highlightedtext @gradio/html @gradio/image @gradio/imageeditor @gradio/json @gradio/label @gradio/markdown @gradio/model3d @gradio/multimodaltextbox @gradio/number @gradio/plot @gradio/radio @gradio/simpledropdown @gradio/simpleimage @gradio/simpletextbox @gradio/slider @gradio/statustracker @gradio/storybook @gradio/textbox @gradio/tootils @gradio/upload @gradio/uploadbutton @gradio/utils @gradio/video gradio gradio_client
minor minor minor minor minor minor minor minor minor minor minor minor minor minor minor minor minor minor minor minor minor minor minor minor minor minor minor minor minor minor minor minor minor minor minor minor minor minor minor minor

highlight:

Setting File Upload Limits

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