-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
Initial SSR refactor #9102
Initial SSR refactor #9102
Conversation
🪼 branch checks and previews
Install Gradio from this PR pip install https://gradio-pypi-previews.s3.amazonaws.com/04a92141dbe233d2d7c650422035290a8cf6931a/gradio-4.41.0-py3-none-any.whl Install Gradio Python Client from this PR pip install "gradio-client @ git+https://github.com/gradio-app/gradio@04a92141dbe233d2d7c650422035290a8cf6931a#subdirectory=client/python" Install Gradio JS Client from this PR npm install https://gradio-npm-previews.s3.amazonaws.com/04a92141dbe233d2d7c650422035290a8cf6931a/gradio-client-1.5.0.tgz |
Demos look good to me @pngwn! You can ignore the failing Should be good to merge once js tests pass |
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.
Thanks! I really like the split spa/lite packages and build configs.
I just reviewed code around lite
and put nit comments but it overall LGTM.
🦄 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.
|
Description
This is the initial part of #8795.
Some light refactoring to make it easier to create both SSR and SPA versions of gradio.
We still need the SPA version so we can fallback to it when node isn't available and also so we can continue to support the embeds.
This PR does the following:
@gradio/core
. This contains mosrt of the inner workings of the gradio frontend, exactly as they were. But instead of being an entire app, these parts are now exported for consumption elsewhere.@gradio/spa
. This consumes@gradio/core
and is the current gradio frontend and what we use to build the actual app currently.@gradio/lite
being a special build of@gradio/app
(or@gradio/core
now). It now has its own dedicated build step + config . All build commands and test commands are contained within the@gradio/lite
packages. This has simplified the configs + build processes of both@gradio/spa
and@gradio/lite
.@gradio/app
is now empty (i'll add the boilerplate in this PR) but this will be the location of the SSR/ node version of the gradio 'app'. I wanted to use 'app' because this more accurately reflects the nature of its contents.