github gradio-app/gradio v3.19.0

latest releases: gradio@5.5.0, @gradio/wasm@0.15.0, @gradio/video@0.11.7...
20 months ago

3.19.0

New Features:

Improved embedding experience

When embedding a spaces-hosted gradio app as a web component, you now get an improved UI linking back to the original space, better error handling and more intelligent load performance. No changes are required to your code to benefit from this enhanced experience; simply upgrade your gradio SDK to the latest version.

This behaviour is configurable. You can disable the info panel at the bottom by passing info="false". You can disable the container entirely by passing container="false".

Error statuses are reported in the UI with an easy way for end-users to report problems to the original space author via the community tab of that Hugginface space:

By default, gradio apps are lazy loaded, vastly improving performance when there are several demos on the page. Metadata is loaded ahead of time, but the space will only be loaded and rendered when it is in view.

This behaviour is configurable. You can pass eager="true" to load and render the space regardless of whether or not it is currently on the screen.

by @pngwn in PR 3205

New gr.BarPlot component! 📊

Create interactive bar plots from a high-level interface with gr.BarPlot.
No need to remember matplotlib syntax anymore!

Example usage:

import gradio as gr
import pandas as pd

simple = pd.DataFrame({
    'a': ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I'],
    'b': [28, 55, 43, 91, 81, 53, 19, 87, 52]
})

with gr.Blocks() as demo:
    gr.BarPlot(
        simple,
        x="a",
        y="b",
        title="Simple Bar Plot with made up data",
        tooltip=['a', 'b'],
    )

demo.launch()

By @freddyaboulton in PR 3157

Bokeh plots are back! 🌠

Fixed a bug that prevented bokeh plots from being displayed on the front end and extended support for both 2.x and 3.x versions of bokeh!

image

By @freddyaboulton in PR 3212

Bug Fixes:

  • Adds ability to add a single message from the bot or user side. Ex: specify None as the second value in the tuple, to add a single message in the chatbot from the "bot" side.
gr.Chatbot([("Hi, I'm DialoGPT. Try asking me a question.", None)])

By @dawoodkhan82 in PR 3165

  • Fixes gr.utils.delete_none to only remove props whose values are None from the config by @abidlabs in PR 3188
  • Fix bug where embedded demos were not loading files properly by @freddyaboulton in PR 3177
  • The change event is now triggered when users click the 'Clear All' button of the multiselect DropDown component by @freddyaboulton in PR 3195
  • Stops File component from freezing when a large file is uploaded by @aliabid94 in PR 3191
  • Support Chinese pinyin in Dataframe by @aliabid94 in PR 3206
  • The clear event is now triggered when images are cleared by @freddyaboulton in PR 3218
  • Fix bug where auth cookies where not sent when connecting to an app via http by @freddyaboulton in PR 3223
  • Ensure latext CSS is always applied in light and dark mode by @pngwn in PR 3233

Documentation Changes:

Testing and Infrastructure Changes:

No changes to highlight.

Breaking Changes:

No changes to highlight.

Full Changelog:

  • Fix demos page css and add close demos button by @aliabd in PR 3151
  • Caches temp files from base64 input data by giving them a deterministic path based on the contents of data by @abidlabs in PR 3197
  • Better warnings (when there is a mismatch between the number of output components and values returned by a function, or when the File component or UploadButton component includes a file_types parameter along with file_count=="dir") by @abidlabs in PR 3194
  • Raises a gr.Error instead of a regular Python error when you use gr.Interface.load() to load a model and there's an error querying the HF API by @abidlabs in PR 3194
  • Fixed gradio share links so that they are persistent and do not reset if network
    connection is disrupted by by XciD, Wauplin, and @abidlabs in PR 3149 and a follow-up to allow it to work for users upgrading from a previous Gradio version in PR 3221

Contributors Shoutout:

No changes to highlight.

Don't miss a new gradio release

NewReleases is sending notifications on new releases.