-
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
Custom component in rerender #10170
Custom component in rerender #10170
Conversation
🪼 branch checks and previews
Install Gradio from this PR pip install https://gradio-pypi-previews.s3.amazonaws.com/bdb07b753fd73352ea60c4364c793825db407afc/gradio-5.8.0-py3-none-any.whl Install Gradio Python Client from this PR pip install "gradio-client @ git+https://github.com/gradio-app/gradio@bdb07b753fd73352ea60c4364c793825db407afc#subdirectory=client/python" Install Gradio JS Client from this PR npm install https://gradio-npm-previews.s3.amazonaws.com/bdb07b753fd73352ea60c4364c793825db407afc/gradio-client-1.8.0.tgz Use Lite from this PR <script type="module" src="https://gradio-lite-previews.s3.amazonaws.com/bdb07b753fd73352ea60c4364c793825db407afc/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.
|
…dio-app/gradio into custom_component_in_rerender
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 fix! Also tested with a different custom component
import gradio as gr
from gradio_pdf import PDF
with gr.Blocks() as demo:
button = gr.Button("Make PDF Visible")
@gr.render(triggers=[button.click])
def render():
PDF("https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf")
if __name__ == "__main__":
demo.launch()
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.
Looks great! Thanks @aliabid94!
* changes * changes * changes --------- Co-authored-by: Ali Abid <aliabid94@gmail.com>
Thanks folks, merging so that we can do a release tom |
Custom components did not work in @render blocks, fixed now. Fixes: #8722 (the remaining issue).
Custom components don't work in dev mode (not sure why), so you'll have to build to test the frontend changes.
Test with: