-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Lite auto-load imported modules with pyodide.loadPackagesFromImports
#9726
Conversation
…tch an event including the result
…he requirements automatically
🪼 branch checks and previews
Install Gradio from this PR pip install https://gradio-pypi-previews.s3.amazonaws.com/7901d7510b6ff2cee142eec5811080c023338b80/gradio-5.4.0-py3-none-any.whl Install Gradio Python Client from this PR pip install "gradio-client @ git+https://github.com/gradio-app/gradio@7901d7510b6ff2cee142eec5811080c023338b80#subdirectory=client/python" Install Gradio JS Client from this PR npm install https://gradio-npm-previews.s3.amazonaws.com/7901d7510b6ff2cee142eec5811080c023338b80/gradio-client-1.7.1.tgz Use Lite from this PR <script type="module" src="https://gradio-lite-previews.s3.amazonaws.com/7901d7510b6ff2cee142eec5811080c023338b80/dist/lite.js""></script> |
🦄 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.
|
pyodide.loadPackagesFromImports
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.
@whitphx this looks good to me! nice work.
Can you explain what you mean by "some" libraries? I assumed we can now move off of having the LLM generate the requirements.
Also if not a big deal, can we add the libraries we auto import to the requirements tab in the playground? would reduce confusion and also if users deploy to spaces with the button it will grab them correctly as well.
@aliabd Thanks!
So we need to keep the LLM-based requirements generator as well and use both so they complement each other.
It's already implemented here: https://github.com/gradio-app/gradio/pull/9726/files#diff-dfae75e4bcb0e1b634f9f9986a9fadc1045e690ad6548bb5c6870f2796bb3126R280-R287 |
Got it, thanks @whitphx! |
Merging in for the release! |
Description
Resolves #9701.
Auto-load (some) modules based on the
import
statements obtained by the AST analysis.