Allow updating the label of gr.UpdateButton (#5280)

* upload button label

* add changeset

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
This commit is contained in:
Abubakar Abid 2023-08-21 11:18:23 -07:00 committed by GitHub
parent 502f1015bf
commit a2f42e28bd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 0 deletions

View File

@ -0,0 +1,5 @@
---
"gradio": minor
---
feat:Allow updating the label of `gr.UpdateButton`

View File

@ -109,6 +109,7 @@ class UploadButton(Clickable, Uploadable, IOComponent, FileSerializable):
| 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,
@ -124,6 +125,7 @@ class UploadButton(Clickable, Uploadable, IOComponent, FileSerializable):
"value": value,
"scale": scale,
"min_width": min_width,
"label": label,
"__type__": "update",
}