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

File Access Guide #9154

Closed
wants to merge 6 commits into from
Closed

File Access Guide #9154

wants to merge 6 commits into from

Conversation

freddyaboulton
Copy link
Collaborator

Description

Pull out the "File Access" section from the "Sharing your App" guide into its own guide.

🎯 PRs Should Target Issues

Before your create a PR, please check to see if there is an existing issue for this change. If not, please create an issue before you create this PR, unless the fix is very small.

Not adhering to this guideline will result in the PR being closed.

Tests

  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

@gradio-pr-bot
Copy link
Collaborator

gradio-pr-bot commented Aug 20, 2024

🪼 branch checks and previews

Name Status URL
Website building...
🦄 Changes detected! Details

@gradio-pr-bot
Copy link
Collaborator

gradio-pr-bot commented Aug 20, 2024

🦄 no changes detected

This Pull Request does not include changes to any packages.

__No changes detected. __

  • Maintainers can select this checkbox to manually select packages to update.

Something isn't right?

  • Maintainers can change the version label to modify the version bump.
  • If the bot has failed to detect any changes, or if this pull request needs to update multiple packages to different versions or requires a more comprehensive changelog entry, maintainers can create the changelog file directly.


Tip: Prefer to read/write files from your prediction function in your application's local directory. But if you need to save files elsewhere, make sure that path is in `allowed_paths`. For example, if you change the default examples caching directory to be outside the current working directory.

## The files Gradio will allow others to access
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I removed the section about cached examples here because it's a little misleading and I think it's adding too much detail.

It's misleading because the files resulting from cached examples are still served from the cache, it's just that they are saved in gradio_cached_examples before being passed to postprocess.

I think without that section the message is clearer "Gradio will serve anything in the cache + whatever you allow it to"

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I moved the content related to the GRADIO_EXAMPLES_CACHE env variable to the next guide though cause it's still important

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.

2 participants