Skip to content

Added support for URLs for Video, Audio, and Image#2256

Merged
abidlabs merged 7 commits into
mainfrom
ex-url
Sep 14, 2022
Merged

Added support for URLs for Video, Audio, and Image#2256
abidlabs merged 7 commits into
mainfrom
ex-url

Conversation

@abidlabs
Copy link
Copy Markdown
Member

Previously, you could only pass in local filepaths for the Video and Audio components. This PR adds support for URLs as well.

Furthermore, while Image supported URLs for default values, examples with URLs didn't work. So this PR also fixes that.

Fixes: #2254

@github-actions
Copy link
Copy Markdown
Contributor

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

@aliabd
Copy link
Copy Markdown
Contributor

aliabd commented Sep 13, 2022

LGTM! Tested locally and works great :)

@abidlabs
Copy link
Copy Markdown
Member Author

Thanks for the review @aliabd! Just updated one of the example demos (reverse audio) to include an example URL.

Once the CI tests pass, I'll merge it in

@abidlabs abidlabs changed the title Added support to pass in URLs for Video, Audio, and Image Added support for URLs for Video, Audio, and Image Sep 14, 2022
@abidlabs abidlabs merged commit 809230f into main Sep 14, 2022
@abidlabs abidlabs deleted the ex-url branch September 14, 2022 00:24
Comment thread demo/reverse_audio/run.py
inputs="microphone",
outputs="audio",
examples=[
os.path.join(os.path.dirname(__file__), "audio/cantina.wav"),
Copy link
Copy Markdown
Collaborator

@freddyaboulton freddyaboulton Sep 14, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@abidlabs This doesn't work on spaces 😬

image

@abidlabs
Copy link
Copy Markdown
Member Author

@freddyaboulton it's working in the demos for this PR? https://huggingface.co/spaces/gradio-pr-deploys/pr-2256-all-demos

@abidlabs
Copy link
Copy Markdown
Member Author

Have you pulled in all of the changes from main into that branch?

@freddyaboulton
Copy link
Copy Markdown
Collaborator

@abidlabs Going to factory reboot the space to see if that fixes it. I think that branch had to have the latest changes from main right? Otherwise the reverse_audio wouldn't have the file URL introduced in this pr.

@abidlabs
Copy link
Copy Markdown
Member Author

Oh it looks like the file is no longer accessible! They probably have a timeout

@abidlabs
Copy link
Copy Markdown
Member Author

abidlabs commented Sep 14, 2022

Ideally we would use a file we're hosting ourselves, but for now can you replace with this one: https://samplelib.com/lib/preview/mp3/sample-3s.mp3

@freddyaboulton
Copy link
Copy Markdown
Collaborator

freddyaboulton commented Sep 14, 2022

@abidlabs Sounds good and thank you! Updated in this PR #2250.

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.

Adding an Image URL to examples doesn't render

3 participants