gradio icon indicating copy to clipboard operation
gradio copied to clipboard

fixing issue 2878

Open or25 opened this issue 2 years ago • 1 comments

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.

or25 avatar Feb 18 '23 09:02 or25

All the demos for this PR have been deployed at https://huggingface.co/spaces/gradio-pr-deploys/pr-3231-all-demos

gradio-pr-bot avatar Feb 19 '23 15:02 gradio-pr-bot

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.

abidlabs avatar Feb 21 '23 11:02 abidlabs

Hi @or25 would you be able to make the updates requested? Or would you like a hand in making these changes?

abidlabs avatar Feb 23 '23 13:02 abidlabs

Hi @or25 we can lend a hand to get this over the finish line.

abidlabs avatar Feb 25 '23 16:02 abidlabs

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 :)

or25 avatar Feb 26 '23 07:02 or25

Just a friendly ping here @or25, would be great to get these in before our next release

abidlabs avatar Feb 28 '23 19:02 abidlabs

The underlying issue (#2878) has already been closed with a different PR, so closing this.

abidlabs avatar Mar 06 '23 15:03 abidlabs