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
Allow gr.Interface.from_pipeline()
and gr.load()
to work within gr.Blocks()
#5231
Conversation
🪼 branch checks and previews
Install Gradio from this PR pip install https://gradio-builds.s3.amazonaws.com/ed4be2992c95cb86780f7f83ba18b5fc258a05f5/gradio-3.40.1-py3-none-any.whl Install Gradio Python Client from this PR pip install "gradio-client @ git+https://github.com/gradio-app/gradio@ed4be2992c95cb86780f7f83ba18b5fc258a05f5#subdirectory=client/python" |
🦄 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.
|
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.
LGTM
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 @abidlabs !
gr.Interface.from_pipeline(pipe1) | ||
with gr.Tab("Image Inference"): | ||
gr.Interface.from_pipeline(pipe2) | ||
demo.launch(prevent_thread_lock=True) |
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.
Let's close the demo when we're done with the test
We were prematurely rendering components when using
Interface.from_pipeline()
as well as usinggr.load()
which meant that you could not use those functions inside of aBlocks()
. This fixes those issues and adds a couple of unit tests.Fixes: #5224
Repros: