Skip to content

Blocks rendering fix#1102

Merged
abidlabs merged 24 commits into
mainfrom
blocks-rendering-fix
Apr 28, 2022
Merged

Blocks rendering fix#1102
abidlabs merged 24 commits into
mainfrom
blocks-rendering-fix

Conversation

@abidlabs
Copy link
Copy Markdown
Member

@abidlabs abidlabs commented Apr 27, 2022

@abidlabs abidlabs changed the base branch from main to optional-labels April 27, 2022 07:54
Base automatically changed from optional-labels to main April 27, 2022 09:22
@abidlabs abidlabs marked this pull request as ready for review April 27, 2022 09:30
Copy link
Copy Markdown
Contributor

@omerXfaruq omerXfaruq left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, would be better if @aliabid94 takes a look as well.

Comment thread demo/blocks_plug/run.py Outdated
Comment thread gradio/blocks.py
Comment thread gradio/interface.py
Comment thread gradio/blocks.py Outdated
@aliabid94
Copy link
Copy Markdown
Contributor

Discussed with @abidlabs earlier, but instead of unrender method, get_component_shortcuts should just create Components with render=False in cunstructor. Should remove the need for unrender.
LGTM otherwise.

@abidlabs
Copy link
Copy Markdown
Member Author

I discussed some more with @aliabid94 and we will actually keep unrender(). We need to handle cases like this:

import gradio as gr

blocks = gr.Blocks()
with blocks:    
    gr.Interface(
      fn=lambda x: x,
      inputs=gr.Image(),
      outputs=gr.Image())
blocks.launch() 

@abidlabs abidlabs merged commit 8ad401b into main Apr 28, 2022
@abidlabs abidlabs deleted the blocks-rendering-fix branch April 28, 2022 08:51
@abidlabs abidlabs restored the blocks-rendering-fix branch April 28, 2022 08:54
Comment thread gradio/components.py
@@ -3100,7 +3099,7 @@ def __init__(
label (str): component name
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

need to update docstring with the label's removal

Comment thread gradio/components.py
label: Optional[str] = None,
css: Optional[Dict] = None,
**kwargs,
):
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not related to this PR but, Dataset has no docstring, let's add one?

Comment thread gradio/components.py
label: Optional[str] = None,
css: Optional[Dict] = None,
**kwargs,
):
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not related to this PR but, Interpretation has no docstring, let's add one?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Article parameter not rendered on Interface beta [Blocks] Support Blocks components as Plug and Use components

3 participants