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

Add download button for audio #4977

Merged
merged 6 commits into from Jul 21, 2023

Conversation

leuryr
Copy link
Contributor

@leuryr leuryr commented Jul 20, 2023

Description

  • Adds download button for audio component.
  • Adds show_download_button param that determines download button visibility in static Audio components.

Closes: #4087

Tests & Changelog

  1. PRs will only be merged if tests pass on CI. To run the tests locally, please set up your Gradio environment locally and run the tests: bash scripts/run_all_tests.sh

  2. You may need to run the linters: bash scripts/format_backend.sh and bash scripts/format_frontend.sh

  3. Unless the pull request is labeled with the "no-changelog-update" label by a maintainer of the repo, all pull requests must update the changelog located in CHANGELOG.md:

Please add a brief summary of the change to the Upcoming Release section of the CHANGELOG.md file and include
a link to the PR (formatted in markdown) and a link to your github profile (if you like). For example, "* Added a cool new feature by [@myusername](link-to-your-github-profile) in [PR 11111](https://github.com/gradio-app/gradio/pull/11111)".

@vercel
Copy link

vercel bot commented Jul 20, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
gradio ✅ Ready (Inspect) Visit Preview Jul 21, 2023 4:35am

@leuryr leuryr marked this pull request as ready for review July 20, 2023 01:25
@leuryr
Copy link
Contributor Author

leuryr commented Jul 20, 2023

Was interested in getting involved and contributing, and saw this was one of the issues with the good first issue label. I tried to follow PR #3581 for this to keep the code consistent, and given it was alluded to in the discussion around this open issue.

I thought to add a test for the addition like there was in that PR, but that file isn't in the repo anymore, so I thought maybe there's a different approach now. Happy to make any changes though!

@abidlabs
Copy link
Member

Thanks @leuryr for this nice contribution! Would you be able to add a show_download_button parameter to gr.Audio as well, similar to this PR: #4959

It can be True by default, but it would allow developers to hide the button if they'd like

@gradio-pr-bot
Copy link
Contributor

gradio-pr-bot commented Jul 20, 2023

All the demos for this PR have been deployed at https://huggingface.co/spaces/gradio-pr-deploys/pr-4977-all-demos


You can install the changes in this PR by running:

pip install https://gradio-builds.s3.amazonaws.com/683bdf762311c71226d8274fa31eed4b0c74b593/gradio-3.38.0-py3-none-any.whl

@leuryr
Copy link
Contributor Author

leuryr commented Jul 20, 2023

@abidlabs sure thing! I'll work on adding it in later today.

@abidlabs
Copy link
Member

Thanks @leuryr for the nice PR! Tested and everything lgtm

@abidlabs abidlabs merged commit c58ea47 into gradio-app:main Jul 21, 2023
12 checks passed
@gradio-pr-bot
Copy link
Contributor

gradio-pr-bot commented Jul 21, 2023

🎉 Chromatic build completed!

There are 27 visual changes to review.
There are 0 failed tests to fix.

abidlabs added a commit that referenced this pull request Jul 21, 2023
@abidlabs
Copy link
Member

Actually let me revert real quickly, only because we are trying out a new changelog process.

abidlabs added a commit that referenced this pull request Jul 21, 2023
abidlabs added a commit that referenced this pull request Jul 21, 2023
@leuryr
Copy link
Contributor Author

leuryr commented Jul 21, 2023

Ah ok, no worries. Thank you for the review @abidlabs , and looking forward to seeing the new changelog process implemented! I read over the PR a bit, and it looks like a substantial change, but one that will overall streamline the process.

abidlabs added a commit that referenced this pull request Jul 22, 2023
* Revert "Revert "Add download button for audio (#4977)" (#4992)"

This reverts commit ad99df4.

* removed changelog updates

* add changeset

* credit leuryr

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Download button for gr.Audio component
3 participants