diff --git a/.changeset/wicked-chairs-wait.md b/.changeset/wicked-chairs-wait.md new file mode 100644 index 0000000000..2eb4f449d9 --- /dev/null +++ b/.changeset/wicked-chairs-wait.md @@ -0,0 +1,5 @@ +--- +"gradio": patch +--- + +fix:Fix bug where updating a component's value in reload mode would not be shown in UI diff --git a/gradio/utils.py b/gradio/utils.py index c561586f8f..0eefcef762 100644 --- a/gradio/utils.py +++ b/gradio/utils.py @@ -312,6 +312,8 @@ def reassign_keys(old_blocks: Blocks, new_blocks: Blocks): old_block.__class__ == new_block.__class__ and old_block is not None and old_block.key not in assigned_keys + and json.dumps(getattr(old_block, "value", None)) + == json.dumps(getattr(new_block, "value", None)) ): new_block.key = old_block.key else: