-
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
Include instructions on starting from someone else's custom component repository #8386
Conversation
🪼 branch checks and previews
|
🦄 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.
|
@@ -35,6 +35,11 @@ If the `window.__GRADIO__CC` variable is not empty (see below for an example), t | |||
It is highly recommended you use a virtual environment to prevent conflicts with other python dependencies installed in your system. | |||
|
|||
|
|||
## Do I always need to start my component from scratch? | |||
No! You can start off from an existing gradio component as a template, see the [five minute guide](./custom-components-in-five-minutes). | |||
You can also start from an existing custom component if you'd like to tweak it further. Once you find the source code of a custom component you like, clone the code to your computer and run `gradio cc install`. Then you can run the development server to make changes.If you run into any issues, contact the author of the component by opening an issue in their repository. The [gallery](https://www.gradio.app/custom-components/gallery) is a good place to look for published components. |
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.
It would be good to clarify that you can clone the Space and maybe provide an example, e.g.
git clone https://huggingface.co/spaces/freddyaboulton/gradio_pdf
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.
Also maybe worth mentioning that you should cd into the root folder of the repo and run gradio cc install
there
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.
Nice @freddyaboulton, lgtm just added a couple of suggestions
Thank you for the feedback @abidlabs ! |
… repository (#8386) * Add guide * add changeset * Fix link * add changeset * Add code --------- Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
* fix css * add changeset * Add `--table-text-color` var to fix body text in `Examples` (#8364) * add --table-text-color var * add changeset * format * tweak * add changeset * fix * add changeset --------- Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com> * Include JS Client package in CI for PR testing (#8362) * add js client pkg action * test * Revert "test" This reverts commit 575bcfc. * tweaks (#8374) * chore: update docs.py (#8378) * chore: update docs.py Documention -> Documentation * add changeset * add changeset --------- Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com> * Fix encoding error (#8381) * Set orig_name in python client file uploads (#8371) * Add code * add changeset * URL case --------- Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com> Co-authored-by: Hannah <hannahblair@users.noreply.github.com> * Include instructions on starting from someone else's custom component repository (#8386) * Add guide * add changeset * Fix link * add changeset * Add code --------- Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com> * Fix bug in reload mode equality check. Better equality conversion for state variables (#8385) * Add code * Add deep equality * add changeset * Add code * add changeset * Update gradio/utils.py Co-authored-by: Abubakar Abid <abubakar@huggingface.co> * Add code * Add code * add code --------- Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com> Co-authored-by: Abubakar Abid <abubakar@huggingface.co> * Change z-index of status tracker (#8372) * change z-index of status tracker * add changeset --------- Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com> * Add CDN installation to JS docs (#8401) * add cdn copy * add changeset * tweak * tweak * add changeset * Update guides/08_gradio-clients-and-lite/02_getting-started-with-the-js-client.md Co-authored-by: Abubakar Abid <abubakar@huggingface.co> * remove version from cdn link * tweak * tweak --------- Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com> Co-authored-by: Abubakar Abid <abubakar@huggingface.co> * Improve rendering (#8398) * changes * add changeset * changes * changes * changes * changes * changes * changes * changeas * changes * add changeset * changes * add changeset * changes * changes * changes * changes * changes * changes * changes * changes * add changeset * changes * cganges * changes * changes * changes * changes * add changeset * changes * chagnes * changes * changes * changes * changes * changes * js * remove console log * changes * changes * changes * changes * changes * changes * changes * changes * changes * add changeset * changes * chnages * changes * cnages * changes * changes * changes * changes * changes * changes * changes * changes * changes * changes * changes * changes * add changeset * changes * changes * changes * changes * changes * changes * changes * add changeset * changes * changes * changes * changes * changes * changes * changes * changes * changes * changes * changes * add changeset * Add `state.change` listener (#8297) * state changes * changes --------- Co-authored-by: Ali Abid <aliabid94@gmail.com> Co-authored-by: Abubakar Abid <abubakar@huggingface.co> * changes * changes * add changeset * changes * changes * changes * changes * changes * changes * updates * changes * add changeset * changes * changes * add changeset * fix * changes * changes * changes * changes * changes * changes * add changeset * changes --------- Co-authored-by: Ali Abid <aliabid94@gmail.com> Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com> Co-authored-by: Abubakar Abid <abubakar@huggingface.co> * Render decorator documentation (#8409) * changes * changes * add changeset * fix dependency loop and documentation group * add changeset * changes * fix numbered list * changes * changes --------- Co-authored-by: Ali Abid <aliabid94@gmail.com> Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com> Co-authored-by: aliabd <ali.si3luwa@gmail.com> * Connect heartbeat if state created in render. Also fix config cleanup bug #8407 (#8408) * Add code * add changeset * add changeset * lint --------- Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com> * Model3D right-handed coordinate system (#8376) * changes (#8411) Co-authored-by: Ali Abid <aliabid94@gmail.com> * Editable Docs (#8403) * docs intro page and guides * python library docs and js client * reorg * changes * add better hovering * fix broken version routing * add redirects and remove duplicate pages * fix build issues * fix issues * formatting * add changeset * working templates for all components * add other pages * merge * merge * changes * changes * working from templates * changes * refactoring * changes * build working * formatting * importing meta globs * add uploading templates to ci * fixes * add changeset * remove fake version * fix * ignore * formatting * adding render page to docs * add changeset * formatting fix * typo --------- Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com> * chore: update versions (#8348) --------- Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com> Co-authored-by: Hannah <hannahblair@users.noreply.github.com> Co-authored-by: Ikko Eltociear Ashimine <eltociear@gmail.com> Co-authored-by: Xu Song <xusong.vip@gmail.com> Co-authored-by: Freddy Boulton <alfonsoboulton@gmail.com> Co-authored-by: Abubakar Abid <abubakar@huggingface.co> Co-authored-by: aliabid94 <aabid94@gmail.com> Co-authored-by: Ali Abid <aliabid94@gmail.com> Co-authored-by: aliabd <ali.si3luwa@gmail.com> Co-authored-by: Dylan Ebert <dylan@huggingface.co> Co-authored-by: pngwn <hello@pngwn.io>
Description
Closes: #8328
🎯 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
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
You may need to run the linters:
bash scripts/format_backend.sh
andbash scripts/format_frontend.sh