NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
PyPI · #1673 most downloaded on PyPI
Python library for easily interacting with trained machine learning models
Last release 2 days ago
02 Oct 2026
Ships on a steady schedule
a new release about every 2 weeks
Nearly every release is documented
notes for 58 of the last 60 stable releases
11 versions withdrawn
withdrawn after publishing
8 years old
679 releases · first in 2019
### Features - #9746 `5015abb` - fix @gradio/sanitize exports. Thanks @pngwn! - #9756 `92f337c` - Fix website build issue. Thanks @aliabd! - #9781 `75
5015abb - fix @gradio/sanitize exports. Thanks @pngwn!92f337c - Fix website build issue. Thanks @aliabd!7579e92 - Allow smoother plot changes. Thanks @aliabid94!47b5565 - Fix broken image select. Thanks @aliabid94!36a5076 - Update client.py: raise error on 429 get_config. Thanks @Pendrokar!a72e1a9 - Streaming Markdown in chatbot Component Fix. Thanks @dawoodkhan82!16895e8 - Fixes #9742. Thanks @crypdick!cd7dab7 - Improve select event behaviour in gr.Dataframe. Thanks @hannahblair!2932e06 - Fix API info bug. Thanks @freddyaboulton!61cd768 - Ensures tabs with visible set to false are not visible. Thanks @hannahblair!38701a9 - Fix icons not showing in Safari. Thanks @hannahblair!2ade59b - Export Tabs type from @gradio/tabs and fix the Playground to be compatible with the new Tabs API. Thanks @whitphx!bcb7d15 - Add a .clear event to the gr.Chatbot component. Thanks @abidlabs!df34f58 - Fixes bug where SVG icons could not be used in Buttons/Chatbots. Thanks @freddyaboulton!One column per quarter.
### Features - #9662 `b1c5a68` - Tweak message shown in Colab notebooks. Thanks @abidlabs! - #9656 `8f6626c` - Fix streaming Audio/Video Output. Thank
b1c5a68 - Tweak message shown in Colab notebooks. Thanks @abidlabs!8f6626c - Fix streaming Audio/Video Output. Thanks @freddyaboulton!3407b50 - Chat Interface Functional test Fix + Chat Examples Center. Thanks @dawoodkhan82!3a19e69 - Revert text disable. Thanks @whitphx!### Fixes - #9528 `9004b11` - Fix Lite to work on FireFox. Thanks @whitphx!
### Features - #9632 `9b58ab0` - bump to node 20. Thanks @pngwn! - #9626 `ec95b02` - Fix stopping chat interface when stop button is clicked. Thanks @
9b58ab0 - bump to node 20. Thanks @pngwn!ec95b02 - Fix stopping chat interface when stop button is clicked. Thanks @aliabid94!c163182 - Fix dark mode detection and container height. Thanks @pngwn!5923c67 - Fix Chatbot Examples Error. Thanks @freddyaboulton!5d98550 - Fix retry and undo reactivity in gr.Chatbot. Thanks @hannahblair!1f3ee97 - Fix Functional Tests. Thanks @dawoodkhan82!Nothing published for this version
### Fixes - #9600 `9f71086` - Ensure undo/try shows for final bot message in gr.Chatbot. Thanks @hannahblair!
### Features - #9437 `c3d93be` - Adding new themes to Gradio 5.0. Thanks @allisonwhilden! - #9593 `cc61fe7` - Some more chatbot fixes. Thanks @dawoodk
c3d93be - Adding new themes to Gradio 5.0. Thanks @allisonwhilden!cc61fe7 - Some more chatbot fixes. Thanks @dawoodkhan82!b92a762 - Disable the submit button and enter-key submit when the text is empty. Thanks @whitphx!e853c41 - SSR e2e + fixes. Thanks @pngwn!139152f - Equal height in row false by default. Thanks @aliabid94!477f45c - Only move files to the cache that have a meta key. Thanks @freddyaboulton!6f8fa54 - Chat Interface Multimodal Fix & Fallback to gr.Examples(). Thanks @dawoodkhan82!bd6c5f2 - Fix custom component CLI on main/5.0. Thanks @freddyaboulton!c078892 - Tweak gr.Dataframe menu UX. Thanks @hannahblair!4ec2feb - Update gr.Dataframe UI with action popover. Thanks @hannahblair!43a7f42 - Chatbot autoscroll. Thanks @whitphx!ffc33fa - Fix markdown code copy/check button in gr.Chatbot. Thanks @hannahblair!430a26a - Fix reload mode. Thanks @freddyaboulton!a9ac396 - Deep equal check with hash. Thanks @aliabid94!17e6c84 - Fix gr.Chatbot panels layout. Thanks @hannahblair!24fe222 - Fix favicon in ssr mode. Thanks @freddyaboulton!### Features - #9550 `b0fedd7` - Fix most flaky Python tests in 5.0-dev branch. Thanks @abidlabs! - #9577 `9f532e0` - Equal height columns. Thanks @al
b0fedd7 - Fix most flaky Python tests in 5.0-dev branch. Thanks @abidlabs!9f532e0 - Equal height columns. Thanks @aliabid94!e0ee3d5 - Update gr.ColorPicker UI. Thanks @hannahblair!8dc7c12 - Send Streaming data over Websocket if possible. Also support base64 output format for images. Thanks @freddyaboulton!06ef22e - Allow info= to render markdown. Thanks @dawoodkhan82!148345d - Fix chatinterface embedding height issues. Thanks @aliabid94!7c367b6 - Fix cut off in gr.ImageEditor. Thanks @hannahblair!3b71ed2 - Api info fix. Thanks @freddyaboulton!b260389 - Change caching to occur not at the creation of a gr.Examples() but when the Blocks is actually launched. Thanks @aliabid94!cf39640 - Add css_paths and head_paths parameters. Thanks @abidlabs!### Features - #9546 `b82aa6f` - Disable sagemaker_check() for now. Thanks @vmatt! - #9545 `098a009` - Add Jinja2 language to Code component. Thanks @
### Features - #9460 `7352a89` - Playground requirements tab. Thanks @whitphx! - #9496 `1647ebd` - UI theme fixes. Thanks @aliabid94! - #9450 `991883e
7352a89 - Playground requirements tab. Thanks @whitphx!1647ebd - UI theme fixes. Thanks @aliabid94!991883e - Improve gr.Code. Thanks @hannahblair!d054262 - Centre components within Block when height and width are set. Thanks @hannahblair!2510a6e - Fix slider-color var. Thanks @hannahblair!488ef76 - Fix custom component CLI unit tests. Thanks @freddyaboulton!4e6a47f - Fixes: Chatbot examples for custom chatbot + rename suggestions -> examples. Thanks @dawoodkhan82!861f5e9 - Fix node process to run with correct server name. Thanks @abidlabs!c307a0c - Minor fixes to docs and a demo. Thanks @abidlabs!0ab6ac5 - Fix change triggers for dropdown and radio. Thanks @dawoodkhan82!### Features - #9470 `b406139` - Add support for 3rd party providers to gr.load, and provide a better UX for conversational models. Thanks @abidlabs!
### Features - #9235 `f8b411f` - Built-in submit and stop buttons in gr.ChatInterface(multimodal=False), adding submit_btn and stop_btn props to gr.Te
f8b411f - Built-in submit and stop buttons in gr.ChatInterface(multimodal=False), adding submit_btn and stop_btn props to gr.Textbox() and gr.MultimodalText(). Thanks @whitphx!5492e74 - Move buttons from chat_interface into Chatbot. Thanks @freddyaboulton!3175c7a - Redesign gr.Tabs(). Thanks @hannahblair!e9e737e - Redesign gr.Button(). Thanks @hannahblair!4a832f4 - Adds TLS to FRP tunnel. Thanks @abidlabs!8a75559 - Minor changes to flagging for 5.0. Thanks @abidlabs!03f3735 - Adds a "huggingface" button variant, and makes it the default for gr.LoginButton and gr.DuplicateButton. Thanks @abidlabs!5bf00b7 - make all component SSR compatible. Thanks @pngwn!dd8e2e3 - Improve button consistency across light/dark mode. Thanks @hannahblair!5f2e047 - Add a 'None' option to the gradio.Image component to disable image_m…. Thanks @GeeMoose!3c73f00 - 🔡 Update default core Gradio font. Thanks @hannahblair!c8cfe93 - Lighten secondary button grey fill. Thanks @hannahblair!38cf712 - Stop using multiprocessing in flagging.CSVLogger on Lite v5. Thanks @whitphx!e137b30 - Decrease component radii and remove input shadows. Thanks @hannahblair!2e179d3 - prefix api routes. Thanks @pngwn!### Features - #9320 `98cbcae` - chore: fix docs style. Thanks @imba-tjd!
### Features - #9302 `ac2c015` - Fileformat whitelist. Thanks @aliabid94! - #9276 `8362a10` - Fix scrollbars everywhere. Thanks @aliabid94! ### Fixes
ac2c015 - Fileformat whitelist. Thanks @aliabid94!8362a10 - Fix scrollbars everywhere. Thanks @aliabid94!8f8e1c6 - Fix multiple trigger bug when function has js. Thanks @freddyaboulton!fb5845c - Separate starlette.Request from PredictBody. Only set in new PredictBodyInternal object. Thanks @freddyaboulton!ecf9137 - Add root_url to components created by gr.render. Thanks @freddyaboulton!### Features - #9160 `8f5a895` - Fix native plot lite demos. Thanks @aliabd! - #9185 `2daf3d1` - Adding maxlength attribute handling of textarea and i
8f5a895 - Fix native plot lite demos. Thanks @aliabd!2daf3d1 - Adding maxlength attribute handling of textarea and input HTML element for the gr.TextBox() component via a max_length parameter. Thanks @WH-Yoshi!5bf00b7 - make all component SSR compatible. Thanks @pngwn!5f2e047 - Add a 'None' option to the gradio.Image component to disable image_m…. Thanks @GeeMoose!### Features - #9128 `747013b` - Allow accessing the entire row of selected values in gr.DataFrame. Thanks @abidlabs! - #8935 `f6b2b97` - Initialize t
747013b - Allow accessing the entire row of selected values in gr.DataFrame. Thanks @abidlabs!f6b2b97 - Initialize the client with the fake host for Lite server. Thanks @whitphx!04b7d32 - Allow drag and replace image in gr.Image and Multimodal textbox. Thanks @hannahblair!41d5ab9 - Add placeholder param to Image and ImageEditor to replace upload image text. Thanks @hannahblair!87e3537 - Add height param to gr.JSON. Thanks @hannahblair!5350f1f - Add copy all messages button to chatbot. Thanks @hannahblair!e1c404d - setup npm-previews of all packages. Thanks @pngwn!efdc323 - Initial SSR refactor. Thanks @pngwn!1a9d729 - Catch OSErrors in HuggingFaceDatasetSaver._deserialize_components. Thanks @davidberenstein1957!96f8ffa - Set non-zero exit codes for custom component build and install commands when failures occur. Thanks @freddyaboulton!173c7b8 - Chatbot Image size and list fixes. Thanks @dawoodkhan82!f1ef94a - Open media type files in browser. Thanks @aliabid94!8715f10 - Allow gr.Request to work with ZeroGPU. Thanks @abidlabs!60650d8 - Reset Dataset page to 0 when samples change. Thanks @abidlabs!ba6322e - Fix image height content fit. Thanks @hannahblair!d6dc384 - Add more typing to event listeners. Thanks @JackismyShephard!30b5d6f - Fix chatinterface multimodal bug. Thanks @freddyaboulton!7b288cf - Fix unexpected rendering of Dataset. Thanks @Col0ring!508ac84 - Set orig_name in downloadbutton postprocess. Thanks @freddyaboulton!6e7d9e5 - Deal with OAuth too many redirects. Thanks @Wauplin!### Features - #8968 `38b3682` - Improvements to FRP client download and usage. Thanks @abidlabs! - #8965 `d30432e` - harden CI. Thanks @pngwn! - #897
38b3682 - Improvements to FRP client download and usage. Thanks @abidlabs!d30432e - harden CI. Thanks @pngwn!d4c503a - Type hint Correction. Thanks @sthemeow!bf6bbd9 - Add min/max-imize button to gr.Image and gr.Gallery. Thanks @hannahblair!981731a - Fix flaky tests and tests on Windows. Thanks @abidlabs!360350c - Minor fixes. Thanks @aliabid94!4ba7b23 - Improve plot guide, add double clicking to plots. Thanks @aliabid94!3feea64 - Prevent overflow in Model3D. Thanks @hannahblair!2f89877 - Set content_disposition_type and media_type on downloaded files. Thanks @aliabid94!4ff91a3 - Fixes some docstrings, particularly for the show_progress parameter. Thanks @abidlabs!08b5159 - Some tweaks to is_in_or_equal. Thanks @freddyaboulton!c68eefb - fix: httpx timeouts cause gradio to fail during launch. Thanks @rsamborski!4d8a473 - Refactor Chatinterface to use Chatbot instead of gr.State variables. Thanks @freddyaboulton!9fa635a - Fix multimodal chatinterface api bug. Thanks @freddyaboulton!4d8a473 - fix: wrong named param check for js client. Thanks @freddyaboulton!0978de8 - Passes gr.Request if type hint is Request | None. Thanks @abidlabs!8b33393 - Fix show_progress in gr.Interface. Thanks @abidlabs!### Features - #8954 `5010e95` - Add overflow: wrap to JSON to catch overflow in xs device widths. Thanks @hannahblair! - #8932 `600c97c` - Allow view
5010e95 - Add overflow: wrap to JSON to catch overflow in xs device widths. Thanks @hannahblair!600c97c - Allow viewing JSON as list or dict with show_indices param. Thanks @hannahblair!3539787 - Add line numbering and collapse/expand logic to gr.JSON. Thanks @hannahblair!ac132e3 - Support the use of custom authentication mechanism, timeouts, and other httpx parameters in Python Client. Thanks @valgai!96d36d7 - Restore plot label angles. Thanks @aliabid94!f7fbd2c - Bump websockets version max for gradio-client. Thanks @evanscho!9b42ba8 - Update guides esp plots. Thanks @aliabid94!70a0c56 - Added support for TokenClassificationPipeline. Thanks @cswamy!7e997a8 - Fix running local app with fake OAuth. Thanks @Wauplin!f8ccb5e - Make update_root_in_config atomic. Thanks @abidlabs!de997e6 - Adds ability to watermark videos via a watermark parameter in Video component. Thanks @meg-huggingface!1e16f67 - Fix check icon in gr.JSON and gr.Code. Thanks @hannahblair!20444f9 - Fix Chatbot Multimodal Examples. Thanks @dawoodkhan82!5f9b8d0 - Fix lazy caching. Thanks @abidlabs!67c08bf - Fix file uploading in iOS. Thanks @hannahblair!4b14ea8 - Allow use of file extensions in gr.File in iOS. Thanks @hannahblair!223688b - Fix Could not resolve "virtual:component-loader" in gradio/utils package. Thanks @benzler!8204425 - Fix Json component serialization bug. Thanks @freddyaboulton!4c2d37d - Add background to gr.Code line numbers. Thanks @hannahblair!### Features - #8832 `e75f2ca` - Fix build for pre-release. Thanks @pngwn! - #8618 `aa4b7a7` - Improve styling of parameter tables in the docs. Thanks
e75f2ca - Fix build for pre-release. Thanks @pngwn!aa4b7a7 - Improve styling of parameter tables in the docs. Thanks @abidlabs!4030f28 - Allows updating the dataset of a gr.Examples. Thanks @abidlabs!6073736 - Document FileData class in docs. Thanks @hannahblair!76c1759 - add space header. Thanks @pngwn!1d09925 - Fix Lite's <Playground />. Thanks @whitphx!a238af4 - Refactor plots to drop altair and use vega.js directly. Thanks @aliabid94!a3d23b4 - Add loop parameters to gr.Audio and gr.Video. Thanks @abidlabs!5622331 - Extend pyright to cover tests as well. Thanks @abidlabs!914b193 - Add copy button to gr.Markdown. Thanks @hannahblair!0d76169 - upgrade pyright==1.1.372. Thanks @abidlabs!9ee6839 - Change optionality of the data param in submit + predict. Thanks @hannahblair!7f41567 - Use constant-time comparison when checking user provided analytics key. Thanks @abidlabs!34510db - Allow HTML in alert modals. Thanks @abidlabs!e1a4040 - Ensure all upload components have consistent upload regions. Thanks @pngwn!cea3bf9 - Fix dependency loop with statustracker and markdown. Thanks @aliabd!2d179f6 - Set the default format of gr.Plot as png for Wasm mode. Thanks @whitphx!e36bab7 - Refactoring loadPyodide typing. Thanks @whitphx!d1f0441 - Use covariant container types across the codebase and add typing to our demos. Thanks @abidlabs!2de9a97 - Refactoring <gradio-lite /> component making the code simpler and fixing a Playground mode bug. Thanks @whitphx!61bb588 - Remove Pydantic v2 patch from Lite. Thanks @whitphx!3a81fb2 - Latex Rendering Fix. Thanks @dawoodkhan82!2f630ab - Chatbot Examples Scroll Fix. Thanks @dawoodkhan82!5050b36 - fix: wrong named param check for js client. Thanks @JacobLinCool!7e8c829 - Add .input() events to gr.Audio and gr.Image. Thanks @abidlabs!7b19474 - Ensure ImageEditor brush color can be updated with gr.update. Thanks @pngwn!16b8200 - Fix gr.Image height inconsistencies. Thanks @hannahblair!### Features - #8766 `2b4636e` - Fix width of assistant's chatbot bubble. Thanks @pngwn!
gr.Chatbot and gr.ChatInterface now support the Messages API, which is fully compatible with LLM API providers such as Hugging Face Text Generation In
4221290)gr.Chatbot and gr.ChatInterface now support the Messages API, which is fully compatible with LLM API providers such as Hugging Face Text Generation Inference, OpenAI's chat completions API, and Llama.cpp server.
Building Gradio applications around these LLM solutions is now even easier!
gr.Chatbot and gr.ChatInterface now have a type parameter that can accept two values - 'tuples' and 'messages'. If set to 'tuples', the default chatbot data format is expected. If set to 'messages', a list of dictionaries with content and role keys is expected. See below -
def chat_greeter(msg, history):
history.append({"role": "assistant", "content": "Hello!"})
return history
Additionally, gradio now exposes a gr.ChatMessage dataclass you can use for IDE type hints and auto completion.
<img width="852" alt="image" src="https://github.com/freddyaboulton/freddyboulton/assets/41651716/d283e8f3-b194-466a-8194-c7e697dca9ad">
The Gradio Chatbot can now natively display tool usage and intermediate thoughts common in Agent and chain-of-thought workflows!
If you are using the new "messages" format, simply add a metadata key with a dictionary containing a title key and value. This will display the assistant message in an expandable message box to show the result of a tool or intermediate step.
import gradio as gr
from gradio import ChatMessage
import time
def generate_response(history):
history.append(ChatMessage(role="user", content="What is the weather in San Francisco right now?"))
yield history
time.sleep(0.25)
history.append(ChatMessage(role="assistant",
content="In order to find the current weather in San Francisco, I will need to use my weather tool.")
)
yield history
time.sleep(0.25)
history.append(ChatMessage(role="assistant",
content="API Error when connecting to weather service.",
metadata={"title": "💥 Error using tool 'Weather'"})
)
yield history
time.sleep(0.25)
history.append(ChatMessage(role="assistant",
content="I will try again",
))
yield history
time.sleep(0.25)
history.append(ChatMessage(role="assistant",
content="Weather 72 degrees Fahrenheit with 20% chance of rain.",
metadata={"title": "🛠️ Used tool 'Weather'"}
))
yield history
time.sleep(0.25)
history.append(ChatMessage(role="assistant",
content="Now that the API succeeded I can complete my task.",
))
yield history
time.sleep(0.25)
history.append(ChatMessage(role="assistant",
content="It's a sunny day in San Francisco with a current temperature of 72 degrees Fahrenheit and a 20% chance of rain. Enjoy the weather!",
))
yield history
with gr.Blocks() as demo:
chatbot = gr.Chatbot(type="messages")
button = gr.Button("Get San Francisco Weather")
button.click(generate_response, chatbot, chatbot)
if __name__ == "__main__":
demo.launch()
Thanks @freddyaboulton!
a92c3e8 - Warn against Falsy credentials. Thanks @Paillat-dev!ee497d5 - Perform CORS validation when the request has a cookie. Thanks @abidlabs!b736c8d - Refactor gr.ParamViewer to use HTML <details> and other tweaks. Thanks @abidlabs!3b8238c - Add c/cpp code support. Thanks @ginazhouhuiwu!e3c7079 - Time range component. Thanks @aliabid94!280a3f4 - GRADIO_ALLOWED_PATHS & GRADIO_BLOCKED_PATHS comma separated environme…. Thanks @cocktailpeanut!fb0daf3 - Improvements to gr.Examples: adds events as attributes and documents, them, adds sample_labels, and visible properties. Thanks @abidlabs!5e36144 - Add guides for msg format and llm agents. Thanks @freddyaboulton!bc1d45d - Model3D point cloud and wireframe display modes. Thanks @dawoodkhan82!012da05 - Ensure JS client status_callback functionality works and improve status messages. Thanks @hannahblair!c1ecfde - 8394 df hidden items. Thanks @pngwn!2943d6d - Add Timer component. Thanks @aliabid94!a6b3c6c - Ensure @gradio/client's submit iterator releases as expected. Thanks @pngwn!26cdd0f - Revert chatbot styling. Thanks @pngwn!0482453 - Chatbot LaTeX Crash Fix. Thanks @dawoodkhan82!e834d30 - ensure @gradio/client always returns the correct data. Thanks @pngwn!31a876d - Fix Share to community button for images. Thanks @hannahblair!d15ada9 - Fix multimodal textbox custom components. Thanks @freddyaboulton!1b5b5b0 - Bind fetch and stream in JS client. Thanks @hannahblair!c946c6f - Allow supplying custom gr.Chatbot with events to gr.ChatInterface. Thanks @abidlabs!a9307c6 - Chatbot generating scroll and click fix. Thanks @freddyaboulton!936c713 - Documents auth in the guides, in the view API page, and also types the Blocks.config object. Thanks @abidlabs!### Features - #8632 `ea6482c` - remove chatbot_multimodal demo from gr.Chatbot documentation page. Thanks @abidlabs! - #8649 `4b6c8b1` - ensure File
ea6482c - remove chatbot_multimodal demo from gr.Chatbot documentation page. Thanks @abidlabs!4b6c8b1 - ensure File objects are handled in JS client handle_file. Thanks @hannahblair!b6fa6b5 - Add docs for .on(), .then(), and .success(), as well as the subclasses of gr.EventData. Thanks @abidlabs!3896398 - Ensure copy button on chatbot shows when appropriate. Thanks @pngwn!9933e53 - Update file_explorer.py for str type height. Thanks @magical-l!c12f82a - Bugfix: Add a file_count parameter to gr.MultimodalTextbox. Multiple files cab be uploaded by setting file_count="multiple". Default is "single" to preserve the previous behavior. Thanks @freddyaboulton!9b8840a - Ensure chatbot messages are visible to screenreaders. Thanks @hannahblair!c348392 - Multimodal textbox buttons alignment. Thanks @dawoodkhan82!### Fixes - #8610 `9204d86` - Add guide on cleaning up state and file resources. Thanks @freddyaboulton!
### Features - #8491 `ffd53fa` - Remove broken guide redirect. Thanks @aliabd! - #8499 `c5f6e77` - Cache break themes on change. Thanks @aliabid94! ##
### Features - #8478 `73e1108` - Adds a monitoring dashboard to Gradio apps that can be used to view usage. Thanks @aliabid94!
### Features - #8481 `41a4493` - fix client flaky tests. Thanks @abidlabs! - #8483 `e2271e2` - documentation for @gradio/client. Thanks @pngwn! - #848
### Features - #8429 `d393a4a` - Fix type hints for render and on. Thanks @freddyaboulton! - #8377 `341844f` - Click to preview images in chatbot. Tha
d393a4a - Fix type hints for render and on. Thanks @freddyaboulton!341844f - Click to preview images in chatbot. Thanks @dawoodkhan82!a970589 - Fix multimodal textbox placeholder. Thanks @dawoodkhan82!4a55157 - state.change listener with deep hash check. Thanks @aliabid94!### Fixes - #8431 `9909b28` - fix scrolling on spaces. Thanks @pngwn!
### Features - #8415 `227de35` - Fix spaces load error. Thanks @aliabid94!
### Features - #8401 `d078621` - Add CDN installation to JS docs. Thanks @hannahblair! - #8243 `55f664f` - Add event listener support to render blocks
d078621 - Add CDN installation to JS docs. Thanks @hannahblair!55f664f - Add event listener support to render blocks. Thanks @aliabid94!945ac83 - Improve rendering. Thanks @aliabid94!ab65360 - Allow JS Client to work with authenticated spaces 🍪. Thanks @hannahblair!e738e26 - Include instructions on starting from someone else's custom component repository. Thanks @freddyaboulton!94a1143 - Add allow-credentials to preflight header. Thanks @abidlabs!5efd35c - Editable Docs. Thanks @aliabd!33e8bab - Enable hiding the inline category in HighlightedText with a show_inline_category argument. Thanks @xu-song!8028c33 - Render decorator documentation. Thanks @aliabid94!3fbf2e8 - chore: update docs.py. Thanks @eltociear!e86dd01 - Connect heartbeat if state created in render. Also fix config cleanup bug #8407. Thanks @freddyaboulton!1f8e5c4 - Improve URL handling in JS Client. Thanks @hannahblair!aebd2e9 - Model3D right-handed coordinate system. Thanks @dylanebert!24ab22d - Fix encoding error. Thanks @xu-song!6a1b58c - Add --table-text-color var to fix body text in Examples. Thanks @hannahblair!2d705bc - Add body color to gr.Accordion. Thanks @hannahblair!a373b0e - Set orig_name in python client file uploads. Thanks @freddyaboulton!97ac79b - Fix bug in reload mode equality check. Better equality conversion for state variables. Thanks @freddyaboulton!89d6a17 - Change z-index of status tracker. Thanks @hannahblair!### Features - #8311 `35905c5` - Cleanup markdown styling. Thanks @aliabid94! ### Fixes - #8339 `4dc7fa7` - Fix Chatbot, Dataframe, Markdown custom co
4dc7fa7 - Fix Chatbot, Dataframe, Markdown custom components. Thanks @freddyaboulton!f138b41 - Use Any if JsonValue cannot be imported. Thanks @freddyaboulton!0236b1a - fix: prevent triggering gr.File.select on delete. Thanks @gtm-nayan!82ba397 - add missing orig_name (follow up to #8334). Thanks @gtm-nayan!47012a0 - ensure the client correctly handles all binary data. Thanks @Saghen!### Features - #8318 `9e31697` - Added image-to-image diffusers pipeline. Thanks @cswamy! ### Fixes - #8247 `8f46556` - Fix api recorder. Thanks @abid
### Features - #8229 `7c81897` - chore(deps): update dependency esbuild to ^0.21.0. Thanks @renovate! - #8279 `4350215` - Link to troubleshooting guid
### Fixes - #8285 `7d9d8ea` - use the correct query param to pass the jwt to the heartbeat event. Thanks @pngwn!
### Features - #8264 `a9e1a8a` - Make exceptions in the Client more specific. Thanks @abidlabs! - #8263 `de52f0e` - Reduce the analytics that are coll
a9e1a8a - Make exceptions in the Client more specific. Thanks @abidlabs!de52f0e - Reduce the analytics that are collected in Gradio. Thanks @abidlabs!0bf3d1a - Fix bug where client could not connect to apps that had self signed certificates. Thanks @freddyaboulton!7e976fd - Send ProcessCompleted message when job is cancelled. Thanks @freddyaboulton!719d596 - Fix bug where status tracker was the target of pointer events. Thanks @freddyaboulton!fbf4edd - ensure client works for private spaces. Thanks @pngwn!### Features - #8226 `892181b` - chore(deps): update dependency @types/prismjs to v1.26.4. Thanks @renovate! - #8254 `0a6f0a7` - Fix custom component
892181b - chore(deps): update dependency @types/prismjs to v1.26.4. Thanks @renovate!0a6f0a7 - Fix custom component detection logic in analytics. Thanks @freddyaboulton!52dac63 - Adds examples_per_page to gr.ChatInterface and allows clear_btn in gr.Interface to be hidden. Thanks @abidlabs!32d915a - Apply clean_indent() to the file contents specified with <gradio-file> tags. Thanks @whitphx!5436031 - Render decorator 2. Thanks @aliabid94!e09b4e8 - Add support for passing keyword args to data in JS client. Thanks @hannahblair!bf909bd - Change upload icon for MultimodalTextbox. Thanks @dawoodkhan82!c562a3d - Cancel server progress from the python client. Thanks @freddyaboulton!05fe491 - Allow Spaces with .success() to be gr.load-ed. Thanks @abidlabs!22df61a - Client node fix. Thanks @pngwn!9ece050 - Fix bug where updating a component's value in reload mode would not be shown in UI. Thanks @freddyaboulton!It is now possible to load a demo with a custom component with gr.load.
72039be)It is now possible to load a demo with a custom component with gr.load.
The custom component must be installed in your system and imported in your python session.
import gradio as gr
import gradio_pdf
demo = gr.load("freddyaboulton/gradiopdf", src="spaces")
if __name__ == "__main__":
demo.launch()
<img width="1284" alt="image" src="https://github.com/gradio-app/gradio/assets/41651716/9c3e846b-f3f2-4c1c-8cb6-53a6d186aaa0">
Thanks @freddyaboulton!
f5b710c - chore(deps): update dependency eslint to v9. Thanks @renovate!a81e369 - Remove hatch installation in js/app/package.json which is no longer needed. Thanks @whitphx!b9afe93 - Rename eventSource_Factory and fetch_implementation. Thanks @hannahblair!bed2f82 - Implement JS Client tests. Thanks @hannahblair!d0a759f - Pass Error status in /dev/reload stream. Thanks @freddyaboulton!611c927 - Lite wheel optimization. Thanks @whitphx!91b5cd6 - remove redundant event source logic. Thanks @hannahblair!24b2286 - allow the canvas size to be set on the ImageEditor. Thanks @pngwn!cfc272f - Set the show_api flag on Lite. Thanks @whitphx!1435d1d - Extend Interface.from_pipeline() to support Transformers.js.py pipelines on Lite. Thanks @whitphx!68dcae5 - Use workspace version for code in _website. Thanks @aliabd!6a218b4 - rework upload to be a class method + pass client into each component. Thanks @pngwn!cf52ca6 - Ensure connectivity to private HF spaces with SSE protocol. Thanks @hannahblair!3a6f1a5 - Only connect to heartbeat if needed. Thanks @freddyaboulton!7aca673 - Add eventsource polyfill for Node.js and browser environments. Thanks @hannahblair!5671ff1 - fix: handling SIGINT correctly in reload.py, single entrance of block_thread in blocks.py. Thanks @Tiger3018!449d0e6 - Refactor analytics to not use api.gradio.app. Thanks @freddyaboulton!39791eb - Convert sse calls in client from async to sync. Thanks @abidlabs!08b4e61 - Add ETag to /custom_component route to control browser caching. Thanks @freddyaboulton!2471f79 - run python reload only if python file changed. Thanks @jameszhou02!376dfaa - Specify the fastapi version on Lite to avoid ujson installation which is not available on Pyodide yet. Thanks @whitphx!### Fixes - #8144 `7ba2780` - fix missing dependencies for @gradio/preview. Thanks @pngwn!
### Fixes - #8142 `44eb8ac` - ensure @gradio/preview dist files are published. Thanks @pngwn!
### Fixes - #8140 `0d41b22` - fix publish build. Thanks @pngwn!
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 fi
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)
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.
Thanks @freddyaboulton!
659d3c5 - chore(deps): update dependency iframe-resizer to v4.3.11. Thanks @renovate!0fb058e - Fix the Lite custom element parser so it doesn't add the .code option when the entrypoint file is already specified. Thanks @whitphx!d665f40 - Fix custom JS function caller to concat the outputs of a dep to the inputs as the arguments. Thanks @whitphx!2e469a5 - Using keys to preserve values between reloads. Thanks @aliabid94!450b8cc - Refactor JS Client. Thanks @hannahblair!595ebf7 - Cache an error from app.submit() and show it on frontend. Thanks @whitphx!1c99570 - Adjust View Api container z-index. Thanks @hannahblair!cbf2d4e - fix typo from #8105. Thanks @abidlabs!cbdfbdf - upgrade ruff test dependency to ruff==0.4.1. Thanks @abidlabs!15a7106 - allow custom component authors to provide custom vite plugins and svelte preprocessors. Thanks @pngwn!568eeb2 - Fix gr.Interface.from_pipeline() to allow audio uploads and to display classification labels correctly. Thanks @whitphx!32cfa61 - Remove auto-created files from gradio cc publish and other tweaks. Thanks @freddyaboulton!6864035 - Add session hash to gr request. Thanks @freddyaboulton!17e83c9 - Docs Reorg and Intro Page. Thanks @aliabd!5bf61cb - Hide the scroll bar in WaveformControls when it's not necessary. Thanks @whitphx!0efd72e - Add Analytics for custom components. Thanks @freddyaboulton!b50a67d - Fix GRADIO_CACHE_EXAMPLES environment variable to only take effect if fn and outputs parameters are provided. Thanks @abidlabs!ac30e07 - [HF OAuth] Logout user if oauth token has expired. Thanks @Wauplin!72f4ca8 - Fix gr.Label styling and a11y markup. Thanks @whitphx!006fa3c - improve the documentation for js parameter in Blocks, Interface, ChatInterface. Thanks @abidlabs!176a8a4 - Fix Label component's value change detection to avoid infinite loop dispatching the change event. Thanks @whitphx!91a7a31 - Store configs per session in the backend. Thanks @aliabid94!d7461aa - Fix an encoding issue in gradio/components/code.py. Thanks @3210448723!5d9db89 - Fix causing Hot Reload (#8070). Thanks @zolgear!937c858 - Use orjson to serialize dict including np.array. Thanks @whitphx!487db7b - Respect auth_dependency parameter in launch(). Thanks @abidlabs!0a42e96 - Allow users to template the ImageEditor when using custom components. Thanks @pngwn!624f9b9 - make gradio dev tools a local dependency rather than bundling. Thanks @pngwn!The ImageEditor component has been refreshed to make it more user-friendly and reliable.
ImageEditorThe ImageEditor component has been refreshed to make it more user-friendly and reliable.
This release contains a host of improvements to the ImageEditor component, that will be of particular interest to those building real-time image editing applications or complex image processing pipelines:
input, upload, change and apply events.change event.06bdf0e - Restore chatbot formatting. Thanks @aliabid94!05f935c - GRADIO_SHARE Environment Variable. Thanks @cocktailpeanut!cecd6e4 - Update dependency iframe-resizer to v4.3.10. Thanks @renovate!92139f3 - refresh the ImageEditor UI. Thanks @pngwn!a0c2848 - Fix internal server error in HF OAuth workflow. Thanks @Wauplin!5f0248e - When authenticating with HF OAuth, stay in same tab. Thanks @Wauplin!074ce38 - ensure the ImageEditor works correctly with layers and change events. Thanks @pngwn!dbb7373 - ensure ImageEditor events work as expected. Thanks @pngwn!c9ddd84 - Update the Lite custom element parser. Thanks @whitphx!299c87c - Document that show_copy_button in gr.Textbox is not visible when show_label=False. Thanks @lappemic!55ef4a5 - Fixes Chatbot Image Sizing. Thanks @dawoodkhan82!e10ec6a - Fix multimode interface double box on file upload. Thanks @TALLEC-Scott!6fafce0 - ensure maps are correctly shallow cloned when updating state. Thanks @pngwn!79e0aa8 - Fix heartbeat in the js client to be Lite compatible. Thanks @whitphx!8903415 - Add show_progress prop to Upload Component to bring back upload progress animation. Thanks @freddyaboulton!d6c289b - round [x, y, w, h] before cropping to avoid unexpected interpolation on pixel values. Thanks @ernestchu!f17d1a0 - Add an explicit dependency of urllib3~=2.0 and update processing_utils.save_url_to_cache to use urllib3 for Lite support. Thanks @whitphx!c1df2f8 - Fix example loading for custom components. Thanks @freddyaboulton!522daf7 - Patch async_save_url_to_cache for Lite. Thanks @whitphx!2a5cb97 - ensure ImageEditor always draws at the correct position. Thanks @hrrbay!0424c75 - Update typer to drop [all] as it is no longer needed. Thanks @joennlae!### Features - #7811 `b43055b` - Lite playground design changes. Thanks @aliabd! - #7850 `2bae1cf` - Adds an "API Recorder" to the view API page, some
b43055b - Lite playground design changes. Thanks @aliabd!2bae1cf - Adds an "API Recorder" to the view API page, some internal methods have been made async. Thanks @abidlabs!b165193 - Restore Markdown formatting for Chatbots, MarkdownCode. Thanks @aliabid94!a4782f7 - Allow displaying gr.Code examples by their filename if value is a tuple. Thanks @freddyaboulton!8250a1a - Handle the case of multiple headers when constructing root url. Thanks @abidlabs!b78129d - Use asyncio.Event to stop stream in heartbeat route. Thanks @freddyaboulton!eae97c2 - Fix task bug in python 3.9. Thanks @freddyaboulton!1a7851c - Fix handling of single font name in theme. Thanks @sd109!1eb4c20 - ensure kwargs are always in sync across the whole application. Thanks @pngwn!7c9a964 - Fix programmatic tab selection. Thanks @aliabid94!057d171 - Correctly handle device selection in Image and ImageEditor. Thanks @hannahblair!b729f10 - Bugfix: Fix color and size keys in theme builder app. Thanks @shubhamofbce!be46ab1 - ensure entire dropdown is clickable. Thanks @dawoodkhan82!bad3836 - Adding hint list[list] for example parameter. Thanks @WH-Yoshi!867ff16 - Trigger the "clear" event of Image Editor. Thanks @uebian!919afff - Adds a Guide on deploying Gradio apps with Docker. Thanks @abidlabs!efd9524 - Fix gr.CheckboxGroup change event. Thanks @freddyaboulton!9666854 - Fixes streaming event race condition. Thanks @aliabid94!Gradio now automatically deletes gr.State variables stored in the server's RAM when users close their browser tab. The deletion will happen 60 minutes
6a4bf7a)Gradio now automatically deletes gr.State variables stored in the server's RAM when users close their browser tab.
The deletion will happen 60 minutes after the server detected a disconnect from the user's browser.
If the user connects again in that timeframe, their state will not be deleted.
Additionally, Gradio now includes a Blocks.unload() event, allowing you to run arbitrary cleanup functions when users disconnect (this does not have a 60 minute delay).
You can think of the unload event as the opposite of the load event.
with gr.Blocks() as demo:
gr.Markdown(
"""# State Cleanup Demo
🖼️ Images are saved in a user-specific directory and deleted when the users closes the page via demo.unload.
""")
with gr.Row():
with gr.Column(scale=1):
with gr.Row():
img = gr.Image(label="Generated Image", height=300, width=300)
with gr.Row():
gen = gr.Button(value="Generate")
with gr.Row():
history = gr.Gallery(label="Previous Generations", height=500, columns=10)
state = gr.State(value=[], delete_callback=lambda v: print("STATE DELETED"))
demo.load(generate_random_img, [state], [img, state, history])
gen.click(generate_random_img, [state], [img, state, history])
demo.unload(delete_directory)
demo.launch(auth=lambda user,pwd: True,
auth_message="Enter any username and password to continue")
Thanks @freddyaboulton!
024b44c - Add support for lazy caching of examples, as well as add GRADIO_CACHE_EXAMPLES env variable. Thanks @abidlabs!c7933ff - Suppress printing "Running on local URL:" when quiet is set. Thanks @dnoliver!b9dbcf7 - Make buttons in gr.ChatInterface more mobile-friendly. Thanks @abidlabs!e6d051d - Paste Images into MultimodalTextbox. Thanks @abidlabs!f42d3e2 - Make internal event handlers of gr.Interface and gr.ChatInterface async. Thanks @freddyaboulton!ccdab9b - logout route deleting cookie fix. Thanks @MichaelPerger!946487c - Cache view_api info in server and python client. Thanks @freddyaboulton!5e66e01 - Fix audio streaming out. Thanks @aliabid94!7bbc3b6 - JS functions break entire app if there's no input, fixed. Thanks @aliabid94!### Features - #7849 `7af3cd7` - Adds a placeholder argument to gr.Chatbot. Thanks @abidlabs! - #7835 `ee804b2` - Stop running iterators when js clien
7af3cd7 - Adds a placeholder argument to gr.Chatbot. Thanks @abidlabs!ee804b2 - Stop running iterators when js client disconnects. Thanks @freddyaboulton!72661e3 - Revert the minify setting in vite.config.js which was mistakingly introduced in #6261. Thanks @whitphx!1a7c8d3 - Stop importing gradio.ipython_ext in Wasm mode. Thanks @whitphx!75a2bf7 - Add guide on Client state and and fix default values of components. Thanks @abidlabs!e0a8b7f - Exclude typer from the requirements list for Wasm env and fix gradio.cli not to be imported. Thanks @whitphx!e3b1236 - Lazy-import pandas. Thanks @whitphx!ecf5c52 - Fix gradio/components/dataframe.py not to import pandas.io. Thanks @whitphx!05db0c4 - Refactor CORS Middleware to be much faster. Thanks @abidlabs!425fd1c - Benchmark fix test. Thanks @aliabid94!### Features - #7782 `2c8cd0a` - Lazy-import altair. Thanks @whitphx! - #7800 `b0a3ea9` - Small fix to client.view_api() in the case of default file v
2c8cd0a - Lazy-import altair. Thanks @whitphx!b0a3ea9 - Small fix to client.view_api() in the case of default file values. Thanks @abidlabs!755157f - Do not reload code inside gr.NO_RELOAD context. Thanks @freddyaboulton!dd3e363 - Fail CI if lint or typecheck fails. Thanks @abidlabs!aad209f - Decrease latency: do not run pre and postprocess in threadpool. Thanks @freddyaboulton!d831040 - Remove Ruff and Uvicorn in Wasm env. Thanks @whitphx!2efb05e - Adds support for kwargs and default arguments in the python client, and improves how parameter information is displayed in the "view API" page. Thanks @abidlabs!c62a57e - Convert Docs Demos to Lite. Thanks @aliabd!f7df92f - Improve UX of non-interactive slider. Thanks @Pythongor!ff6bf3e - Remove the aiohttp mock from the Wasm worker as it's removed in https://github.com/gradio-app/gradio/pull/5244. Thanks @whitphx!43ae23f - Fix accidental bug that prevented custom textboxes from being passed to chatinterface. Thanks @freddyaboulton!e78bca4 - Trigger input event for Radio even when radio is output component. Thanks @freddyaboulton!781678b - Fix root url resolution from x_forwarded_host headers. Thanks @abidlabs!cf98c7e - Adds trigger_mode to gr.on. Use it to set trigger_model="always_last" for live interfaces. Thanks @freddyaboulton!ca42748 - Ensure paginate updates when samples value changes in Dataset. Thanks @hannahblair!### Features - #7743 `a2badf1` - Migrate to Storybook 8. Thanks @hannahblair! - #7680 `853d945` - Add format parameter to gr.Image, gr.Gallery, gr.Ann
a2badf1 - Migrate to Storybook 8. Thanks @hannahblair!853d945 - Add format parameter to gr.Image, gr.Gallery, gr.AnnotatedImage, gr.Plot to control format to save image files in. Thanks @dfl!84f81fe - Closing stream from the backend. Thanks @aliabid94!15da39f - Multimodal Textbox (Chat Input Component). Thanks @dawoodkhan82!aca4892 - More fixes for gr.load() as well as a tweaking the __str__ and __repr__ methods of components. Thanks @abidlabs!f739bef - Add Playground to Lite Custom Element. Thanks @aliabd!0a3870d - Call handle_darkmode() even if window.__gradio_mode__ === "website" but enforce the light theme. Thanks @whitphx!7d3c868 - Detailed error message for wasm_utils.get_registered_app(). Thanks @whitphx!04857bc - Add allowed_paths, blocked_paths, show_error, and favicon_path parameters to gr.mount_gradio_app. Thanks @abidlabs!aba4470 - Add auth, auth_message, and root_path parameters to mount_gradio_app. Thanks @abidlabs!188b86b - Add support for object-detection models in gr.load(). Thanks @abidlabs!5d1e8da - batch UI updates on a per frame basis. Thanks @pngwn!6390d0b - Add support for python client connecting to gradio apps running with self-signed SSL certificates. Thanks @abidlabs!a1c24db - Fix OAuth + fix OAuth documentation + undocument logout button. Thanks @Wauplin!c9aba8d - Fixes: gr.Markdown is not updated properly when it has an image tag. Thanks @dawoodkhan82!95c6bc8 - Fix flagged files and ensure that flagging_mode="auto" saves output components as well. Thanks @abidlabs!bc61ff6 - Several fixes to gr.load. Thanks @abidlabs!7f9b291 - Cast button value as string in postprocess. Thanks @heaversm!84f81fe - Fix race condition between state updates and loading_status updates. Thanks @aliabid94!f67759d - Fix wasm_proxied_mount_css to not reuse an existing style element. Thanks @whitphx!598ad7b - fix dev mode. Thanks @pngwn!28342a2 - Fix httpx timeout issues. Thanks @freddyaboulton!### Features - #7577 `7c66a29` - Fix the Lite custom element to initialize the app in the connected callback and dispose the app in the disconnected c
7c66a29 - Fix the Lite custom element to initialize the app in the connected callback and dispose the app in the disconnected callback. Thanks @whitphx!1a4b089 - Refactor example_inputs(), separating its logic into two separate methods: example_payload() and example_value(). Thanks @abidlabs!6ebf0ce - Add support for diffuser pipelines in gr.Interface.from_pipeline(). Thanks @shubhamofbce!048364c - downgrade contourpy. Thanks @abidlabs!2edba13 - Fix CrossOriginWorkerMaker to cache the blob URL. Thanks @whitphx!9482c7a - fix: redundant meta tags that are unwanted. Thanks @qkdxorjs1002!ba8cc48 - feature detect CSSStylesheet. Thanks @pngwn!d0688b3 - Files should now be supplied as file(...) in the Client, and some fixes to gr.load() as well. Thanks @abidlabs!a22f3e0 - Fixing root path issue with subpath being repeated twice. Thanks @abidlabs!b3b0ea3 - Add --python-path, --pip-path, --gradio-path CLI arguments to let custom component developers control which executable is used. Thanks @freddyaboulton!0ae1e44 - Control which files get moved to cache with gr.set_static_paths. Thanks @freddyaboulton!cb3999e - Use x-forwarded-host header to determine the root url, and let users provide a full root_path to override the automatically determined root url. Thanks @abidlabs!### Features - #7625 `8181695` - image upload fix. Thanks @dawoodkhan82!
8181695 - image upload fix. Thanks @dawoodkhan82!### Features - #7557 `4d5789e` - Allow mounted Gradio apps to work with external / arbitrary authentication providers. Thanks @abidlabs! - #7614 `355e
4d5789e - Allow mounted Gradio apps to work with external / arbitrary authentication providers. Thanks @abidlabs!355ed66 - Fix the root_url logic for streaming files. Thanks @abidlabs!9c6de6d - Upgrade Pyodide to 0.25.0. Thanks @whitphx!a57e34e - Add delete_cache parameter to gr.Blocks to delete files created by app on shutdown. Thanks @freddyaboulton!98aa808 - Add /logout functionality for Gradio auth. Thanks @abidlabs!375bfd2 - Fix server_messages.py to use the patched BaseModel class for Wasm env. Thanks @aliabid94!3645da5 - Fix incorrect relative mouse coordinates for Gallery preview overlay. Thanks @MMP0!eda33b3 - Refactors get_fetchable_url_or_file() to remove it from the frontend. Thanks @abidlabs!4b0d589 - chore(deps): update all non-major dependencies. Thanks @renovate!561579d - fix-tests. Thanks @pngwn!bd2c695 - Adds a gr.DownloadButton component. Thanks @abidlabs!d3384cb - Prevent additional paths that can trigger credential leakage on Windows. Thanks @abidlabs!f84720c - Prevent paths beginning with // or \\. Thanks @abidlabs!1c22123 - Fixes method to resolve the root URLs. Thanks @abidlabs!26356a6 - Fixes: Invalid file_type breaks drag and drop. Thanks @dawoodkhan82!fc4c2db - Allow Python Client to upload/download files when connecting to Gradio apps with auth enabled. Thanks @abidlabs!08c2d49 - when adding custom head html, ensure there are no duplicate meta tags. Thanks @qkdxorjs1002!1fa2e91 - Fixes auth_message so that it correctly renders HTML. Thanks @abidlabs!f26aba0 - Prevent audio speeding up when trimming. Thanks @hannahblair!e340894 - Quick fix: custom dropdown value. Thanks @dawoodkhan82!### Features - #7495 `ddd4d3e` - Enable Ruff S101. Thanks @abidlabs! - #7443 `b7a97f2` - Update httpx to httpx>=0.24.1 in requirements.txt. Thanks @ab
ddd4d3e - Enable Ruff S101. Thanks @abidlabs!b7a97f2 - Update httpx to httpx>=0.24.1 in requirements.txt. Thanks @abidlabs!16fbe9c - Prevent components from working with non-uploaded files. Thanks @aliabid94!84802ee - Tighten CORS rules. Thanks @abidlabs!98a2719 - Fix z-index layer of orange generating border. Thanks @daviirodrig!9c36572 - Quick fix: File height overflow. Thanks @dawoodkhan82!ddd4d3e - ensure Dataframe headers are aligned with content when scrolling. Thanks @abidlabs!ba3ec13 - Tab select fix. Thanks @aliabid94!b186767 - Fix Gallery preview overlay and backdrop. Thanks @MMP0!33f68cb - Fix Canvas3D/Canvas3DGS async imports. Thanks @whitphx!### Features - #7453 `ba747ad` - Make fix in #7444 (Block /file= filepaths that could expose credentials on Windows) more general. Thanks @abidlabs! -
ba747ad - Make fix in #7444 (Block /file= filepaths that could expose credentials on Windows) more general. Thanks @abidlabs!c88290d - WIP: Optimize /file route. Thanks @freddyaboulton!e329f1f - Prevent timing attacks to guess Gradio passwords. Thanks @abidlabs!3e4e680 - Fixes to the .key_up() method to make it usable for a dynamic dropdown autocomplete. Thanks @abidlabs!4faf8a7 - Block /file= filepaths that could expose credentials on Windows. Thanks @abidlabs!f52cab6 - Dispatch change event for file explorer. Thanks @aliabid94!fb1f6be - Run pre/post processing in threadpool. Thanks @freddyaboulton!6b8a7e5 - Ensure gr.Dropdown can have an empty initial value. Thanks @hannahblair!f191786 - Improve responsiveness of gr.Audio() controls. Thanks @hannahblair!### Features - #7406 `3e886d8` - Model3D Gaussian Splatting. Thanks @dylanebert! ### Fixes - #7402 `fa8225d` - Use updated component in postprocess().
3e886d8 - Model3D Gaussian Splatting. Thanks @dylanebert!fa8225d - Use updated component in postprocess(). Thanks @abidlabs!17fb116 - Fixes gr.Markdown() does not render spaces around links correctly. Thanks @dawoodkhan82!65437ce - Improve File Explorer performance. Thanks @aliabid94!c2dfc59 - remove static while pending behaviour. Thanks @pngwn!b5c74ff - Fix HTTPX package crash for some values of "article" parameter in the interface. Thanks @YuryYakhno!4ab399f - Allow config to include non-pickle-able values. Thanks @abidlabs!065c5b1 - Add .key_up event listener to gr.Dropdown(). Thanks @abidlabs!314ccfa - Fix File Explorer interactivity. Thanks @aliabid94!dff4109 - Retain dropdown value if choices have been changed. Thanks @abidlabs!32b317f - Set root correctly for Gradio apps that are deployed behind reverse proxies. Thanks @abidlabs!46b4568 - Allow applying @media, @keyframes and @import in custom CSS. Thanks @hannahblair!### Features - #7299 `f35f615` - Added remove button for every file in file preview, to remove individual file in gr.File(). Thanks @shubhamofbce! - #
f35f615 - Added remove button for every file in file preview, to remove individual file in gr.File(). Thanks @shubhamofbce!49d9c48 - [WIP] Refactor file normalization to be in the backend and remove it from the frontend of each component. Thanks @abidlabs!7e9b206 - Stop using deprecated pydantic config class and filter gradio warnings from tests. Thanks @freddyaboulton!6dfd40f - Make set_documentation_group a no-op. Thanks @freddyaboulton!c1a7ea7 - Add SQL Support for gr.Code. Thanks @aersam!7b10d97 - Remove the @gradio/wasm dependency from @gradio/gallery that is not used. Thanks @whitphx!b95d0d0 - Allow setting custom headers in Python Client. Thanks @abidlabs!1e68561 - Update Pydantic patch for Lite that emulates PydanticV2 API using V1. Thanks @whitphx!cccab27 - E2E tests for Lite. Thanks @whitphx!a7fa47a - ensure Dataframes in background tabs are visible when the tab is selected. Thanks @pngwn!2244059 - Ensure CSS .dark rule selectors are applied. Thanks @hannahblair!4dc9ffb - Store gr.Accordion's open value. Thanks @hannahblair!7f19ba2 - Stop caching root url. Thanks @abidlabs!7302a6e - Fix gr.load for file-based Spaces. Thanks @abidlabs!### Features - #7129 `ccdaec4` - Add a simpleimage template for custom components. Thanks @abidlabs! - #7313 `edfd05d` - Expand chatinterface to full
ccdaec4 - Add a simpleimage template for custom components. Thanks @abidlabs!edfd05d - Expand chatinterface to full window height. Thanks @aliabid94!aa97a5e - Improvements to API Docs. Thanks @abidlabs!e418edd - Fix SimpleImage package json. Thanks @abidlabs!5181957 - Add mobile Chromatic tests. Thanks @hannahblair!e5344ba - chore(deps): update dependency marked to v12. Thanks @renovate!572e360 - Upload tweak. Thanks @pngwn!0fddd0f - Determine documentation group automatically. Thanks @akx!68a54a7 - Improve chatbot streaming performance with diffs. Thanks @aliabid94!/n Note that this PR changes the API format for generator functions, which would be a breaking change for any clients reading the EventStream directlyefacc7d - Ensure open reactivity in Accordion. Thanks @hannahblair!2e6672c - Allow start/pause of streaming image input. Only access the webcam while it's needed. Thanks @freddyaboulton!dec6a71 - Fix PIL imports. Thanks @akx!fdd1521 - chore: Change time format (thanks @jjshoots for the independent contribution). Thanks @arian81!3c8c4ac - Document the gr.ParamViewer component, and fix component preprocessing/postprocessing docstrings. Thanks @abidlabs!46919c5 - Defer importing matplotlib. Thanks @akx!8bb0ce2 - Hotfix for: stt_or_tts demo. Thanks @abidlabs!200e251 - Add gr.Image interaction test + gr.ImageEditor interaction test improvement. Thanks @hannahblair!87d5105 - Handle httpx.InvalidURL when setting non-URL article strings. Thanks @nopperl!aab2a75 - Allow selecting texts in dataframe cells. Thanks @shubhamofbce!05d8a3c - Update ruff to 0.1.13, enable more rules, fix issues. Thanks @akx!b3a9c83 - Lite: Wasm-compatible Model3D. Thanks @whitphx!7ea8336 - Remove flag_dir from read_from_flag(). Thanks @akx!6a7e98b - Fix hyphen-bug in gradio cc publish. Thanks @freddyaboulton!60078df - Fix test requirements to be compatible with python 3.11. Thanks @abidlabs!09257ef - Fix ci cache. Thanks @pngwn!1893756 - Small cleanups of Code component. Thanks @abidlabs!aea14c4 - Refactor Inference API and rename it to Serverless Inference Endpoints. Thanks @abidlabs!24157a3 - add background color based on the OS mode. Thanks @aileenvl!8dd6f4b - Handle the case where examples is null for all components. Thanks @abidlabs!757dba6 - Add show_label check to gr.Dataframe. Thanks @hannahblair!2d51a9d - Add missing parameters and docstrings for gr.TabbedInterface. Thanks @abidlabs!9f23b0b - Optimize client view_api method. Thanks @freddyaboulton!ded5256 - Fix audio recording events not dispatching. Thanks @hannahblair!733ca26 - Ensure examples Images displays as expected. Thanks @hannahblair!a3aa22f - Adjust Value to Fix .Label Display. Thanks @codydh!0d36ac0 - Fixes issue with datatype setting in gr.Dataframe. Setting no longer dependent on col_count. Thanks @cswamy!db27df3 - Escape triple quotes when creating space.py for custom components. Thanks @abidlabs!c3e61e4 - Few File component drag and drop. Thanks @dawoodkhan82!cae05c0 - Fix single file upload display. Thanks @freddyaboulton!e3217b4 - Amend audio waveform colour. Thanks @hannahblair!b25e95e - Fix processing_utils.save_url_to_cache() to follow redirects when accessing the URL. Thanks @whitphx!d7095c4 - Number example fix. Thanks @abidlabs!faead14 - Show label in interactive image editor. Thanks @hannahblair!3b8dfc6 - Add visible check to Tab. Thanks @hannahblair!daaaf95 - Fixes issues related to gr.Dataframe receiving an empty dataframe. Thanks @cswamy!### Features - #7124 `21a16c6` - add params to gr.Interface and gr.ChatInterface. Thanks @abidlabs! - #7139 `6abad53` - Added polars dataframe support
21a16c6 - add params to gr.Interface and gr.ChatInterface. Thanks @abidlabs!6abad53 - Added polars dataframe support with demo. Thanks @cswamy!94aa271 - Improve rapid generation performance via UI throttling. Thanks @aliabid94!bc2cdc1 - Allow download button for interactive Audio and Video components. Thanks @hannahblair!125a832 - generate docs when running gradio cc build. Thanks @pngwn!c60ad4d - Use Gallery as input component. Thanks @freddyaboulton!1718c4a - add STL 3D model support. Thanks @Mon-ius!6ee22dc - Ensure gradio cc publish uploads the documentation space, if it exists. Thanks @pngwn!82fe73d - Redirect with query params after oauth. Thanks @Wauplin!2cdcf4a - Single oauth button. Thanks @Wauplin!5727b92 - Allow buttons to take null value. Thanks @abidlabs!217bfe3 - Support audio data in np.int8 format in the gr.Audio component. Thanks @Ram-Pasupula!ac73555 - Run before_fn and after_fn for each generator iteration. Thanks @freddyaboulton!7d53aa1 - Miscellaneous doc fixes. Thanks @abidlabs!ca8753b - Fixes: Chatbot crashes when given empty url following http:// or https://. Thanks @dawoodkhan82!cb90b3d - Programmatically determine max wheel version to push to spaces. Thanks @freddyaboulton!80f8fbf - Add logic to handle non-interactive or hidden tabs. Thanks @hannahblair!b961652 - Remove kwargs from template components. Thanks @freddyaboulton!45f725f - un-disable output components after exception is raised. Thanks @abidlabs!44c53d9 - Fix dropdown refocusing due to <label /> element. Thanks @hannahblair!e7ab406 - Fix ParamViewer css. Thanks @freddyaboulton!28e8a8a - Reduce CPU usage of dev mode. Thanks @freddyaboulton!c35fac0 - Ensure device selection works in Audio when streaming. Thanks @hannahblair!13cb6af - Ensure microphone devices list updates. Thanks @hannahblair!be56c76 - Lite: Add the home_dir to sys.path. Thanks @whitphx!8c355a4 - Add ruff mock for Lite. Thanks @whitphx!e8b2d8b - Add sample rate config option to gr.Audio(). Thanks @tsukumijima!If your custom component has type hints and docstrings for both parameters and return values, you can now automatically generate a documentation page
3a944ed)If your custom component has type hints and docstrings for both parameters and return values, you can now automatically generate a documentation page and README.md with no additional effort. Simply run the following command:
gradio cc docs
This will generate a Gradio app that you can upload to spaces providing rich documentation for potential users. The documentation page includes:
A README will also be generated detailing the same information but in a format that is optimised for viewing on GitHub or PyPi!
Thanks @pngwn!
1fc8a94 - fix lint. Thanks @freddyaboulton!07d520c - fix versions. Thanks @pngwn!3642b7a - publish: simplify twine_files code. Thanks @akx!64c65d8 - Add encoding to open/writing files on the deploy_discord function. Thanks @WilliamHarer!f2d69fc - Fix gallery thumbnail design regression. Thanks @hannahblair!ec28b4e - Add visible and interactive params to gr.Tab(). Thanks @hannahblair!aaecfe5 - Themes: fix bogus header image URL. Thanks @akx!a336508 - Fix bug preventing layout components to be used as custom components. Thanks @freddyaboulton!3c3cf86 - Fix UI freeze on rapid generators. Thanks @aliabid94!9201f86 - Raise error in build step if custom component package is not installed. Thanks @freddyaboulton!9cefd2e - Refactor examples so they accept data in the same format as is returned by function, rename .as_example() to .process_example(). Thanks @abidlabs!523b6bc - gr.update(value=[]) for gr.File() clears it. Thanks @dawoodkhan82!6be3c2c - Fix Chatbot custom component template. Thanks @freddyaboulton!3f139c7 - Fix File drag and drop for specific file_types. Thanks @dawoodkhan82!### Features - #6994 `623bc1a` - Switch default order for sources for gr.Video so that upload is the default. Thanks @abidlabs! - #6965 `5d00dd3` - Ma
623bc1a - Switch default order for sources for gr.Video so that upload is the default. Thanks @abidlabs!5d00dd3 - Make <UploadProgress /> Wasm-compatible. Thanks @whitphx!ccf317f - Add additional_inputs, additional_inputs_accordion parameters to gr.Interface. Thanks @abidlabs!8dfabee - fixed typo. Thanks @Cassini-chris!793bf8f - Display pending file in <Upload /> while waiting for upload request. Thanks @hannahblair!640b7fe - Fix issue with Webcam Recording. Thanks @dawoodkhan82!5e00162 - Make <Gallery /> Wasm-compatible. Thanks @whitphx!6e285be - Fix the reloader. Thanks @aliabid94!0f0498b - Ensure Chatbot theme text size is set correctly. Thanks @hannahblair!### Features - #6133 `f742d0e` - Lite: Support AnnotatedImage on Wasm. Thanks @whitphx! - #6778 `8a093e2` - Add a dev instruction for lite in SharedWo
f742d0e - Lite: Support AnnotatedImage on Wasm. Thanks @whitphx!8a093e2 - Add a dev instruction for lite in SharedWorker mode. Thanks @whitphx!6c863af - Fix functional tests. Thanks @aliabid94!fb9c6ca - Lite: Chatbot. Thanks @whitphx!4511d57 - Fix the aria-label attrs in gr.Chatbot(). Thanks @whitphx!649cd4d - Use EventSource_factory in open_stream() for Wasm. Thanks @whitphx!02c2442 - Fix docstring of deprecated parameter concurrency_count. Thanks @ronensc!24a5836 - Component Server fix. Thanks @aliabid94!8333db8 - Fix the Wasm worker to initialize the app directories. Thanks @whitphx!e671e54 - Allow gr.ClearButton and gr.DuplicateButton to be made hidden (and otherwise updated). Thanks @abidlabs!b1b78c2 - Fix .select for gr.Image, gr.CheckboxGroup. Thanks @abidlabs!bd11d6e - Remove the styles on the audio elements in the Chatbot component. Thanks @whitphx!d361a0f - Ensure camera settings only update when necessary in Model3D. Thanks @hannahblair!459c5dc - replacing distutils.StrictVersion dependency for Python 3.12. Thanks @velaia!7bab755 - Fixed (this this). Thanks @Cassini-chris!31c2316 - fix issue 6873: File with file_count='directory' bug. Thanks @joshwilson-dev!c00da89 - Fix returning copies of a component instance from a prediction function. Thanks @abidlabs!### Features - #6839 `e974cf0` - Custom JS Guide. Thanks @dawoodkhan82! - #6854 `e528f98` - chore(deps): update dependency mrmime to v2. Thanks @renov
e974cf0 - Custom JS Guide. Thanks @dawoodkhan82!e528f98 - chore(deps): update dependency mrmime to v2. Thanks @renovate!d406855 - Fix JS Client when app is running behind a proxy. Thanks @freddyaboulton!48d6534 - Add show_api parameter to events, and fix gr.load(). Also makes some minor improvements to the "view API" page when running on Spaces. Thanks @abidlabs!15c97c6 - Fix webcam when streaming=True. Thanks @hannahblair!7bb561a - Rewriting parts of the README and getting started guides for 4.0. Thanks @abidlabs!Your coding agent can read these notes before it upgrades. Set up the MCP server →