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 processing_utils.save_url_to_cache()
to follow redirects when accessing the URL
#7322
Conversation
🪼 branch checks and previews
|
🦄 change detectedThis Pull Request includes changes to the following packages.
With the following changelog entry.
Maintainers or the PR author can modify the PR title to modify this entry.
|
…ccessing the URL
efd314d
to
03909c2
Compare
…adio into url-cache-follow-redirects
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.
I think the only other place where we need to make this change is validate_url
in gradio/utils.py
. Other than that, looks great! Thanks @whitphx !
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.
LGTM @whitphx! Added follow_redirects
to a few missing places and added a test. Will merge in to include in the release.
…ccessing the URL (#7322) * Fix `processing_utils.save_url_to_cache()` to follow redirects when accessing the URL * add changeset * follow more redirects * format * add changeset * add test * validate urls --------- Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com> Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
Description
Closes: #7247
When testing this PR, remove your local Gradio cache first.
httpx
methods don't follow URL redirects by default.Refs:
In this PR, only
processing_utils.save_url_to_cache()
is modified to address #7247 , but do you think if there are some other places where the same fix should be applied?