gradio
gradio copied to clipboard
fixing issue 2878
fix of #2878
When creating a File temp obj, after writing the data to the file, tell() was at the end of the file, so i seeked it to 0.
Description
Please include:
- relevant motivation
- a summary of the change
- which issue is fixed.
- any additional dependencies that are required for this change.
Closes: # 2878
Checklist:
- [x] I have performed a self-review of my own code
- [x] I have added a short summary of my change to the CHANGELOG.md
- [x] My code follows the style guidelines of this project
- [x] I have commented my code in hard-to-understand areas
- [x] I have made corresponding changes to the documentation
- [ ] I have added tests that prove my fix is effective or that my feature works
- [ ] New and existing unit tests pass locally with my changes
A note about the CHANGELOG
Hello 👋 and thank you for contributing to Gradio!
All pull requests must update the change log located in CHANGELOG.md, unless the pull request is labeled with the "no-changelog-update" label.
Please add a brief summary of the change to the Upcoming Release > Full Changelog section of the CHANGELOG.md file and include
a link to the PR (formatted in markdown) and a link to your github profile (if you like). For example, "* Added a cool new feature by [@myusername](link-to-your-github-profile)
in [PR 11111](https://github.com/gradio-app/gradio/pull/11111)
".
If you would like to elaborate on your change further, feel free to include a longer explanation in the other sections. If you would like an image/gif/video showcasing your feature, it may be best to edit the CHANGELOG file using the GitHub web UI since that lets you upload files directly via drag-and-drop.
All the demos for this PR have been deployed at https://huggingface.co/spaces/gradio-pr-deploys/pr-3231-all-demos
Thanks @or25! PR looks good to me. Would you able to add a quick unit test? I think we can add it to test/test_components
in TestFile.test_component_functions()
. Basically, we'd want to ensure that the processing produces a file that is 0-seeked.
Hi @or25 would you be able to make the updates requested? Or would you like a hand in making these changes?
Hi @or25 we can lend a hand to get this over the finish line.
Hi @or25 we can lend a hand to get this over the finish line.
hi! Sorry for the late replay, lots of exams. I'll finish it at the weekend :)
Just a friendly ping here @or25, would be great to get these in before our next release
The underlying issue (#2878) has already been closed with a different PR, so closing this.