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
Allow supporting >1000 files in gr.File()
and gr.UploadButton()
#5075
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
🦄 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.
|
All the demos for this PR have been deployed at https://huggingface.co/spaces/gradio-pr-deploys/pr-5075-all-demos You can install the changes in this PR by running: pip install https://gradio-builds.s3.amazonaws.com/097b7caff6bc97f563a37afb50707976b5606933/gradio-3.39.0-py3-none-any.whl |
Thanks @hannahblair for the review! @freddyaboulton raised a good point internally. I'll address that in Slack more fully and then will merge this in. |
A few months ago,
starlette
decided to limit the number of files that could be uploaded via a single request to 1,000 by default (though configurable). FastAPI does not support configuring this yet, though there is an open PR.This has prevented Gradio users from uploading more than 1,000 files through our
UploadButton
andFile
components. This PR modifies theupload_files()
method used in the frontend to upload files in batches of 1,000 to get around this limitation.Fixes: #4361
To test: