Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(deps): update dependency gradio to v3.23.0 #54

Merged
merged 1 commit into from
Mar 21, 2023

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Mar 21, 2023

Mend Renovate

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
gradio 3.18.0 -> 3.23.0 age adoption passing confidence

Release Notes

gradio-app/gradio

v3.23.0

Compare Source

New Features:

Theme Sharing!

Once you have created a theme, you can upload it to the HuggingFace Hub to let others view it, use it, and build off of it! You can also download, reuse, and remix other peoples' themes. See https://gradio.app/theming-guide/ for more details.

By @​freddyaboulton in PR 3428

Bug Fixes:

Documentation Changes:

No changes to highlight.

Testing and Infrastructure Changes:

No changes to highlight.

Breaking Changes:

No changes to highlight.

Full Changelog:

Contributors Shoutout:

No changes to highlight.

v3.22.1

Compare Source

New Features:

No changes to highlight.

Bug Fixes:

Documentation Changes:

No changes to highlight.

Testing and Infrastructure Changes:

No changes to highlight.

Breaking Changes:

No changes to highlight.

Full Changelog:

No changes to highlight.

Contributors Shoutout:

No changes to highlight.

v3.22.0

Compare Source

New Features:

Official Theme release

Gradio now supports a new theme system, which allows you to customize the look and feel of your app. You can now use the theme= kwarg to pass in a prebuilt theme, or customize your own! See https://gradio.app/theming-guide/ for more details. By @​aliabid94 in PR 3470 and PR 3497

elem_classes

Add keyword argument elem_classes to Components to control class names of components, in the same manner as existing elem_id.
By @​aliabid94 in PR 3466

Bug Fixes:

  • Fixes the File.upload() event trigger which broke as part of the change in how we uploaded files by @​abidlabs in PR 3462
  • Fixed issue with gr.Request object failing to handle dictionaries when nested keys couldn't be converted to variable names #​3454 by @​radames in PR 3459
  • Fixed bug where css and client api was not working properly when mounted in a subpath by @​freddyaboulton in PR 3482

Documentation Changes:

Testing and Infrastructure Changes:

Breaking Changes:

No changes to highlight.

Full Changelog:

Contributors Shoutout:

No changes to highlight.

v3.21.0

Compare Source

New Features:

Theme Sharing 🎨 🤝

You can now share your gradio themes with the world!

After creating a theme, you can upload it to the HuggingFace Hub to let others view it, use it, and build off of it!

Uploading

There are two ways to upload a theme, via the theme class instance or the command line.

  1. Via the class instance
my_theme.push_to_hub(repo_name="my_theme",
                     version="0.2.0",
                     hf_token="...")
  1. Via the command line

First save the theme to disk

my_theme.dump(filename="my_theme.json")

Then use the upload_theme command:

upload_theme\
"my_theme.json"\
"my_theme"\
"0.2.0"\
"<hf-token>"

The version must be a valid semantic version string.

This creates a space on the huggingface hub to host the theme files and show potential users a preview of your theme.

An example theme space is here: https://huggingface.co/spaces/freddyaboulton/dracula_revamped

Downloading

To use a theme from the hub, use the from_hub method on the ThemeClass and pass it to your app:

my_theme = gr.Theme.from_hub("freddyaboulton/my_theme")

with gr.Blocks(theme=my_theme) as demo:
    ....

You can also pass the theme string directly to Blocks or Interface (gr.Blocks(theme="freddyaboulton/my_theme"))

You can pin your app to an upstream theme version by using semantic versioning expressions.

For example, the following would ensure the theme we load from the my_theme repo was between versions 0.1.0 and 0.2.0:

with gr.Blocks(theme="freddyaboulton/my_theme@>=0.1.0,<0.2.0") as demo:
    ....

by @​freddyaboulton in PR 3428

Code component 🦾

New code component allows you to enter, edit and display code with full syntax highlighting by @​pngwn in PR 3421

The Chatbot component now supports audio, video, and images

The Chatbot component now supports audio, video, and images with a simple syntax: simply
pass in a tuple with the URL or filepath (the second optional element of the tuple is alt text), and the image/audio/video will be displayed:

gr.Chatbot([
    (("driving.mp4",), "cool video"),
    (("cantina.wav",), "cool audio"),
    (("lion.jpg", "A lion"), "cool pic"),
]).style(height=800)
image

Note: images were previously supported via Markdown syntax and that is still supported for backwards compatibility. By @​dawoodkhan82 in PR 3413

  • Allow consecutive function triggers with .then and .success by @​aliabid94 in PR 3430

  • New code component allows you to enter, edit and display code with full syntax highlighting by @​pngwn in PR 3421

  • Added the .select() event listener, which also includes event data that can be passed as an argument to a function with type hint gr.SelectData. The following components support the .select() event listener: Chatbot, CheckboxGroup, Dataframe, Dropdown, File, Gallery, HighlightedText, Label, Radio, TabItem, Tab, Textbox. Example usage:
import gradio as gr

with gr.Blocks() as demo:
    gallery = gr.Gallery(["images/1.jpg", "images/2.jpg", "images/3.jpg"])
    selected_index = gr.Textbox()

    def on_select(evt: gr.SelectData):
        return evt.index
    
    gallery.select(on_select, None, selected_index)

By @​aliabid94 in PR 3399

Bug Fixes:

Documentation Changes:

Testing and Infrastructure Changes:

Breaking Changes:

No changes to highlight.

Full Changelog:

Contributors Shoutout:

No changes to highlight.

v3.20.1

Compare Source

New Features:

chatbot = gr.Chatbot().style(height=500)

Bug Fixes:

  • Ensure uploaded images are always shown in the sketch tool by @​pngwn in PR 3386
  • Fixes bug where when if fn is a non-static class member, then self should be ignored as the first param of the fn by @​or25 in PR #​3227

Documentation Changes:

No changes to highlight.

Testing and Infrastructure Changes:

No changes to highlight.

Breaking Changes:

No changes to highlight.

Full Changelog:

No changes to highlight.

Contributors Shoutout:

No changes to highlight.

v3.20.0

Compare Source

New Features:

Release event for Slider

Now you can trigger your python function to run when the slider is released as opposed to every slider change value!

Simply use the release method on the slider

slider.release(function, inputs=[...], outputs=[...], api_name="predict")

By @​freddyaboulton in PR 3353

Dropdown Component Updates

The standard dropdown component now supports searching for choices. Also when multiselect is True, you can specify max_choices to set the maximum number of choices you want the user to be able to select from the dropdown component.

gr.Dropdown(label="Choose your favorite colors", choices=["red", "blue", "green", "yellow", "orange"], multiselect=True, max_choices=2)

by @​dawoodkhan82 in PR 3211

Download button for images 🖼️

Output images will now automatically have a download button displayed to make it easier to save and share
the results of Machine Learning art models.

download_sketch

By @​freddyaboulton in PR 3297

  • Updated image upload component to accept all image formats, including lossless formats like .webp by @​fienestar in PR 3225
  • Adds a disabled mode to the gr.Button component by setting interactive=False by @​abidlabs in PR 3266 and PR 3288
  • Adds visual feedback to the when the Flag button is clicked, by @​abidlabs in PR 3289
  • Adds ability to set flagging_options display text and saved flag separately by @​abidlabs in PR 3289
  • Allow the setting of brush_radius for the Image component both as a default and via Image.update() by @​pngwn in PR 3277
  • Added info= argument to form components to enable extra context provided to users, by @​aliabid94 in PR 3291
  • Allow developers to access the username of a logged-in user from the gr.Request() object using the .username attribute by @​abidlabs in PR 3296
  • Add preview option to Gallery.style that launches the gallery in preview mode when first loaded by @​freddyaboulton in PR 3345

Bug Fixes:

  • Ensure mirror_webcam is always respected by @​pngwn in PR 3245
  • Fix issue where updated markdown links were not being opened in a new tab by @​gante in PR 3236
  • API Docs Fixes by @​aliabd in PR 3287
  • Added a timeout to queue messages as some demos were experiencing infinitely growing queues from active jobs waiting forever for clients to respond by @​freddyaboulton in PR 3196
  • Fixes the height of rendered LaTeX images so that they match the height of surrounding text by @​abidlabs in PR 3258 and in PR 3276
  • Fix bug where matplotlib images where always too small on the front end by @​freddyaboulton in PR 3274
  • Remove embed's initial_height when loading is complete so the embed finds its natural height once it is loaded @​pngwn in PR 3292
  • Prevent Sketch from crashing when a default image is provided by @​pngwn in PR 3277
  • Respect the shape argument on the front end when creating Image Sketches by @​pngwn in PR 3277
  • Fix infinite loop caused by setting Dropdown's value to be [] and adding a change event on the dropdown by @​freddyaboulton in PR 3295
  • Fix change event listed twice in image docs by @​aliabd in PR 3318
  • Fix bug that cause UI to be vertically centered at all times by @​pngwn in PR 3336
  • Fix bug where height set in Gallery.style was not respected by the front-end by @​freddyaboulton in PR 3343
  • Ensure markdown lists are rendered correctly by @​pngwn in PR 3341
  • Ensure that the initial empty value for gr.Dropdown(Multiselect=True) is an empty list and the initial value for gr.Dropdown(Multiselect=False) is an empty string by @​pngwn in PR 3338
  • Ensure uploaded images respect the shape property when the canvas is also enabled by @​pngwn in PR 3351
  • Ensure that Google Analytics works correctly when gradio apps are created with analytics_enabled=True by @​abidlabs in PR 3349
  • Fix bug where files were being re-uploaded after updates by @​freddyaboulton in PR 3375
  • Fix error when using backen_fn and custom js at the same time by @​jialeicui in PR 3358
  • Support new embeds for huggingface spaces subdomains by @​pngwn in PR 3367

Documentation Changes:

Testing and Infrastructure Changes:

Breaking Changes:

  • Chatbot bubble colors can no longer be set by chatbot.style(color_map=) by [@​aliabid94] in PR 3370

Full Changelog:

Contributors Shoutout:

No changes to highlight.

v3.19.1

Compare Source

New Features:

No changes to highlight.

Bug Fixes:

Documentation Changes:

No changes to highlight.

Testing and Infrastructure Changes:

No changes to highlight.

Breaking Changes:

No changes to highlight.

Full Changelog:

  • Added backend support for themes by @​aliabid94 in PR 2931
  • Added support for button sizes "lg" (default) and "sm".

Contributors Shoutout:

No changes to highlight.

v3.19.0

Compare Source

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

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.


Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Enabled.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR has been generated by Mend Renovate. View repository job log here.

@renovate renovate bot added the dependencies Pull requests that update a dependency file label Mar 21, 2023
@codecov-commenter
Copy link

codecov-commenter commented Mar 21, 2023

Codecov Report

Merging #54 (f960ab3) into main (58d06aa) will not change coverage.
The diff coverage is 100.00%.

📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

@@           Coverage Diff           @@
##             main      #54   +/-   ##
=======================================
  Coverage   17.53%   17.53%           
=======================================
  Files          28       28           
  Lines        3251     3251           
  Branches      361      361           
=======================================
  Hits          570      570           
  Misses       2667     2667           
  Partials       14       14           
Impacted Files Coverage Δ
src/so_vits_svc_fork/__init__.py 100.00% <100.00%> (ø)

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@renovate renovate bot merged commit a2bdb48 into main Mar 21, 2023
@renovate renovate bot deleted the renovate/gradio-3.x-lockfile branch March 21, 2023 08:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant