-
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
Add support for altair plots #2741
Conversation
8086d3e
to
ab9f8dd
Compare
All the demos for this PR have been deployed at https://huggingface.co/spaces/gradio-pr-deploys/pr-2741-all-demos |
5709e88
to
6d82190
Compare
"@gradio/video": "workspace:^0.0.1", | ||
"@gradio/uploadbutton": "workspace:^0.0.1" |
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.
I added this cause I got missing peer dependencies
errors in pnpm. Not sure if it's actually needed
This is really great @freddyaboulton! LGTM Suggestions:
Some suggestions for future:
|
5903b03
to
fd67379
Compare
fd67379
to
f4a0eab
Compare
The demo notebooks don't match the run.py files. Please run this command from the root of the repo and then commit the changes: pip install nbformat && cd demo && python generate_notebooks.py |
The demo notebooks don't match the run.py files. Please run this command from the root of the repo and then commit the changes: pip install nbformat && cd demo && python generate_notebooks.py |
1 similar comment
The demo notebooks don't match the run.py files. Please run this command from the root of the repo and then commit the changes: pip install nbformat && cd demo && python generate_notebooks.py |
The demo notebooks don't match the run.py files. Please run this command from the root of the repo and then commit the changes: pip install nbformat && cd demo && python generate_notebooks.py |
Co-authored-by: aliabid94 <aabid94@gmail.com>
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.
Frontend looks good to me!
Thank you @pngwn !! 🐧 |
Description
Run
python demo/altair_plot/run.py
Getting the spacing to work out may be tricky. I tried setting the width and height to
container
(https://vega.github.io/vega-lite/docs/size.html#specifying-responsive-width-and-height) but that doesn't work (plot doesn't show up). To complicate matters, users can specify their own plot width and height on the python side so we should be careful to respect those choices.For now I'm centering the plot to make it look nicer despite the white space.
Checklist:
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.