Fixes: Initial message is overwrtitten in chat interface (#6229)

* fix

* add changeset

* format

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
This commit is contained in:
Dawood Khan 2023-11-02 15:30:36 -04:00 committed by GitHub
parent 2c9fd437f8
commit 5cddd65880
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 1 deletions

View File

@ -0,0 +1,5 @@
---
"gradio": patch
---
fix:Fixes: Initial message is overwrtitten in chat interface

View File

@ -242,7 +242,9 @@ class ChatInterface(Blocks):
client_utils.synchronize_async(self.examples_handler.cache)
self.saved_input = State()
self.chatbot_state = State([])
self.chatbot_state = (
State(self.chatbot.value) if self.chatbot.value else State([])
)
self._setup_events()
self._setup_api()