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

Fix blocks_kitchen_sink and streaming_stt demos #4699

Merged
merged 5 commits into from
Jun 28, 2023
Merged

Conversation

freddyaboulton
Copy link
Collaborator

@freddyaboulton freddyaboulton commented Jun 27, 2023

Description

The streaming_stt demo is broken because spaces default python version is 3.10 now but deepspeech==0.9.3 is only available up to python 3.9. EDIT: We're just going to delete the demo since deepspeech is not maintained. The fix I'm proposing is that we have an optional README.json in the demo dir with any values the deployed space should have in the readme. In the case of streaming_stt, this would be {"python_version": "'3.9'"}

Deployed the following demos with this script to test:

https://huggingface.co/spaces/freddyaboulton/streaming_stt
https://huggingface.co/spaces/freddyaboulton/blocks_inputs
https://huggingface.co/spaces/freddyaboulton/calculator

blocks_kitchen_sink is not expected to work outside of all_demos so I deleted the space and making changes so that it does not get deployed again.

🎯 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 & Changelog

  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

  3. Unless the pull request is labeled with the "no-changelog-update" label by a maintainer of the repo, all pull requests must update the changelog located in CHANGELOG.md:

Please add a brief summary of the change to the Upcoming Release 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)".

@freddyaboulton freddyaboulton added docs/website Related to documentation or website no-changelog-update labels Jun 27, 2023
@gradio-pr-bot
Copy link
Collaborator

gradio-pr-bot commented Jun 27, 2023

🎉 The demo notebooks match the run.py files! 🎉

---
"""
readme.open("w").write(textwrap.dedent(readme_content))
---
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Moving the text here otherwise the indented lines will mess up the README in the deployed space. textwrap.dedent is not working as expected so had to resort to this.

@gradio-pr-bot
Copy link
Collaborator

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

@@ -26,7 +26,7 @@ def git_tracked(demo, file):
"""

files = os.listdir(os.path.join(GRADIO_DEMO_DIR, demo))
skip = ["run.py", "run.ipynb", "setup.sh", ".gitignore", "requirements.txt", "DESCRIPTION.md", "screenshot.png", "screenshot.gif"]
skip = ["run.py", "run.ipynb", "setup.sh", ".gitignore", "requirements.txt", "DESCRIPTION.md", "screenshot.png", "screenshot.gif", "README.json"]
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Should not be present in the colab

@freddyaboulton freddyaboulton marked this pull request as ready for review June 27, 2023 20:11
@abidlabs
Copy link
Member

The fix I'm proposing is that we have an optional README.json in the demo dir with any values the deployed space should have in the readme

Could we just have a README.md itself that can be uploaded to Spaces? Would be simpler to maintain.

That being said, specifically for this demo streaming_stt, I actually think we should remove it because deepspeech is no longer maintained. We also do not reference this demo in any other part of the codebase so it would be safe to delete.

@freddyaboulton
Copy link
Collaborator Author

Might be easiest to just delete then!

@abidlabs
Copy link
Member

Yeah sounds good, we can revisit if there are more important demos that require specific readmes

@abidlabs
Copy link
Member

LGTM thanks @freddyaboulton

@freddyaboulton
Copy link
Collaborator Author

Thank you @abidlabs 😄

@freddyaboulton freddyaboulton merged commit b7072b1 into main Jun 28, 2023
@freddyaboulton freddyaboulton deleted the fix-more-demos branch June 28, 2023 00:55
dawoodkhan82 pushed a commit that referenced this pull request Jun 28, 2023
* Add code

* Add json file

* Remove streaming_stt demo

* Undo generate_notebooks

* Add blocks_kitchen_sink
dawoodkhan82 added a commit that referenced this pull request Jun 28, 2023
* playwright tests for chatbot

* more tests

* changelog

* Update CHANGELOG.md

* fix upload file delay (#4661)

* fix

* changes

* changes

---------

Co-authored-by: Abubakar Abid <[email protected]>

* Forward `tqdm` constructor arguments to `Progress` component (#4475)

* Forward tqdm constructor arguments to Progress component

Signed-off-by: Ilya Trushkin <[email protected]>

* lint

* reorder args

* added tests

---------

Signed-off-by: Ilya Trushkin <[email protected]>
Co-authored-by: Abubakar Abid <[email protected]>

* Remove cleared_value (#4685)

* Remove cleared_value

* CHANGELOG

* Add requirements.txt to dialogpt demo (#4686)

* Add requirements.txt

* Update demo notebook

* Add torch

* remove streaming demo + more tests

* Fix blocks_kitchen_sink and streaming_stt demos (#4699)

* Add code

* Add json file

* Remove streaming_stt demo

* Undo generate_notebooks

* Add blocks_kitchen_sink

* fix tests

* Update js/app/test/chatbot_multimodal.spec.ts

Co-authored-by: pngwn <[email protected]>

* Update js/app/test/chatbot_multimodal.spec.ts

Co-authored-by: pngwn <[email protected]>

* Update js/app/test/chatbot_multimodal.spec.ts

Co-authored-by: pngwn <[email protected]>

* Update js/app/test/chatbot_multimodal.spec.ts

Co-authored-by: pngwn <[email protected]>

* Update js/app/test/chatbot_multimodal.spec.ts

Co-authored-by: pngwn <[email protected]>

* Update js/app/test/chatbot_multimodal.spec.ts

Co-authored-by: pngwn <[email protected]>

* Update js/app/test/chatbot_multimodal.spec.ts

Co-authored-by: pngwn <[email protected]>

* Update js/app/test/chatbot_multimodal.spec.ts

Co-authored-by: pngwn <[email protected]>

* Update js/app/test/chatbot_multimodal.spec.ts

Co-authored-by: pngwn <[email protected]>

* update notebook

* remove debug

* remove debug

---------

Signed-off-by: Ilya Trushkin <[email protected]>
Co-authored-by: aliabid94 <[email protected]>
Co-authored-by: Abubakar Abid <[email protected]>
Co-authored-by: Ilya Trushkin <[email protected]>
Co-authored-by: Freddy Boulton <[email protected]>
Co-authored-by: pngwn <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs/website Related to documentation or website
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants