-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Added support for URLs for Video
, Audio
, and Image
#2256
Conversation
All the demos for this PR have been deployed at https://huggingface.co/spaces/gradio-pr-deploys/pr-2256-all-demos |
LGTM! Tested locally and works great :) |
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 |
Video
, Audio
, and Image
@@ -14,7 +14,7 @@ def reverse_audio(audio): | |||
inputs="microphone", | |||
outputs="audio", | |||
examples=[ | |||
os.path.join(os.path.dirname(__file__), "audio/cantina.wav"), |
There was a problem hiding this comment.
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 😬
@freddyaboulton it's working in the demos for this PR? https://huggingface.co/spaces/gradio-pr-deploys/pr-2256-all-demos |
Have you pulled in all of the changes from |
@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. |
Oh it looks like the file is no longer accessible! They probably have a timeout |
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 |
Previously, you could only pass in local filepaths for the
Video
andAudio
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