Skip to content

Commit

Permalink
Add a bare Component type to the acceptable type list of `gr.load()…
Browse files Browse the repository at this point in the history
…`'s `inputs` and `outputs` (#5732)

* Add a bare `Component` type to the acceptable type list of `gr.load()`'s `inputs` and `outputs`

* add changeset

* add changeset

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
Co-authored-by: Freddy Boulton <alfonsoboulton@gmail.com>
  • Loading branch information
3 people committed Sep 28, 2023
1 parent 78e7cf5 commit 3a48490
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/witty-kings-push.md
@@ -0,0 +1,5 @@
---
"gradio": patch
---

fix:Add a bare `Component` type to the acceptable type list of `gr.load()`'s `inputs` and `outputs`
4 changes: 2 additions & 2 deletions gradio/blocks.py
Expand Up @@ -1664,8 +1664,8 @@ def __exit__(self, exc_type: type[BaseException] | None = None, *args):
def load(
self: Blocks | None = None,
fn: Callable | None = None,
inputs: list[Component] | None = None,
outputs: list[Component] | None = None,
inputs: Component | list[Component] | None = None,
outputs: Component | list[Component] | None = None,
api_name: str | None | Literal[False] = None,
scroll_to_output: bool = False,
show_progress: str = "full",
Expand Down

0 comments on commit 3a48490

Please sign in to comment.