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 infinite reload loop when gradio mounted as a sub application #2477

Merged
merged 2 commits into from
Oct 18, 2022

Conversation

freddyaboulton
Copy link
Collaborator

@freddyaboulton freddyaboulton commented Oct 17, 2022

Description

Fixes #2427

The fix is to set dev mode to false in when gradio is mounted as sub application. My thinking is that if you're mounting gradio as a sub app and want hot reloading, you can just launch fast api in reload mode yourself.

Checklist:

  • I have performed a self-review of my own code
  • I have added a short summary of my change to the CHANGELOG.md
  • My code follows the style guidelines of this project
  • I have commented my code in hard-to-understand areas
  • 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.

@github-actions
Copy link
Contributor

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

@freddyaboulton freddyaboulton marked this pull request as ready for review October 17, 2022 21:50
@abidlabs
Copy link
Member

Thanks for fixing this @freddyaboulton! The logic makes sense and I've confirmed that it works locally.

@freddyaboulton freddyaboulton force-pushed the 2427-mount-gradio-app-reload-loop branch from 62f8f35 to dd719e5 Compare October 18, 2022 20:06
@freddyaboulton freddyaboulton force-pushed the 2427-mount-gradio-app-reload-loop branch from dd719e5 to 5f75d26 Compare October 18, 2022 20:11
@freddyaboulton freddyaboulton merged commit 668905f into main Oct 18, 2022
@freddyaboulton freddyaboulton deleted the 2427-mount-gradio-app-reload-loop branch October 18, 2022 20:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

mount_gradio_app causing reload loop
2 participants