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 #5229 #5235
fix #5229 #5235
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.
|
@@ -239,6 +239,8 @@ def preprocess( | |||
return output_file_name | |||
elif not self.include_audio: | |||
output_file_name = str(file_name.with_name(f"muted_{file_name.name}")) | |||
if Path(output_file_name).exists(): |
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.
Can you please add a unit test @breengles ? Otherwise looks good!
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.
Hi @freddyaboulton! I added a simple test just like the one for the default behavior of gr.Video()
Thank you for the contribution @breengles ! |
Description
Add checking if a file already exists when
include_audio=False
has been used withgradio.Video
(similar to the default behavior).Closes: #5229 (cc: @abidlabs)
Tests
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
--- All passed (with 74 warnings, tbh)
You may need to run the linters:
bash scripts/format_backend.sh
andbash scripts/format_frontend.sh
--- It affects mainly CHANGELOG.md files in different places, should be ok with the proposed changes to the Video component.