Spaces:
Sleeping
Sleeping
ใ
ใ
ใ
commited on
Commit ยท
40e39e0
1
Parent(s): 1ffb9f7
Fix: Clear chatbot and textbox when clearing chat - Update clear button to reset chatbot, session_id, and textbox - Fix issue where only session_id was being reset
Browse files- CodeWeaver/ui/app.py +3 -4
CodeWeaver/ui/app.py
CHANGED
|
@@ -174,14 +174,13 @@ def create_demo() -> gr.Blocks:
|
|
| 174 |
|
| 175 |
def clear_chat_and_reset():
|
| 176 |
# ๋ํ ์ด๊ธฐํ ๋ฐ ์ธ์
ID ๋ฆฌ์
|
| 177 |
-
return [], str(uuid.uuid4())
|
| 178 |
|
| 179 |
-
# Clear ๋ฒํผ ํด๋ฆญ ์ ๋ํ
|
| 180 |
-
# ChatInterface์ chatbot_value ์ฌ์ฉ (๊ณต์ ๋ฌธ์ ํจํด)
|
| 181 |
clear_chat_btn.click(
|
| 182 |
clear_chat_and_reset,
|
| 183 |
None,
|
| 184 |
-
[
|
| 185 |
queue=False
|
| 186 |
)
|
| 187 |
|
|
|
|
| 174 |
|
| 175 |
def clear_chat_and_reset():
|
| 176 |
# ๋ํ ์ด๊ธฐํ ๋ฐ ์ธ์
ID ๋ฆฌ์
|
| 177 |
+
return [], str(uuid.uuid4()), ""
|
| 178 |
|
| 179 |
+
# Clear ๋ฒํผ ํด๋ฆญ ์ ๋ํ, ์ธ์
ID, ์
๋ ฅ์ฐฝ ๋ชจ๋ ๋ฆฌ์
|
|
|
|
| 180 |
clear_chat_btn.click(
|
| 181 |
clear_chat_and_reset,
|
| 182 |
None,
|
| 183 |
+
[chatbot, session_id_input, chatbot_interface.textbox],
|
| 184 |
queue=False
|
| 185 |
)
|
| 186 |
|