Skip to content

Commit

Permalink
Allow updating the label of gr.UpdateButton (#5280)
Browse files Browse the repository at this point in the history
* upload button label

* add changeset

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
  • Loading branch information
abidlabs and gradio-pr-bot committed Aug 21, 2023
1 parent 502f101 commit a2f42e2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/eight-things-travel.md
@@ -0,0 +1,5 @@
---
"gradio": minor
---

feat:Allow updating the label of `gr.UpdateButton`
2 changes: 2 additions & 0 deletions gradio/components/upload_button.py
Expand Up @@ -109,6 +109,7 @@ def update(
| list[str]
| Literal[_Keywords.NO_VALUE]
| None = _Keywords.NO_VALUE,
label: str | None = None,
size: Literal["sm", "lg"] | None = None,
variant: Literal["primary", "secondary", "stop"] | None = None,
interactive: bool | None = None,
Expand All @@ -124,6 +125,7 @@ def update(
"value": value,
"scale": scale,
"min_width": min_width,
"label": label,
"__type__": "update",
}

Expand Down

0 comments on commit a2f42e2

Please sign in to comment.