Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -37,11 +37,11 @@ async def cancel_local_func(state_chatbot: Sequence, cancel_btn: gr.Button,
|
|
| 37 |
reset_btn (gr.Button): the reset button
|
| 38 |
session_id (int): the session id
|
| 39 |
"""
|
| 40 |
-
yield (state_chatbot, disable_btn, disable_btn)
|
| 41 |
InterFace.async_engine.stop_session(session_id)
|
| 42 |
# pytorch backend does not support resume chat history now
|
| 43 |
if InterFace.async_engine.backend == 'pytorch':
|
| 44 |
-
yield (state_chatbot, disable_btn, enable_btn)
|
| 45 |
else:
|
| 46 |
with InterFace.lock:
|
| 47 |
InterFace.global_session_id += 1
|
|
|
|
| 37 |
reset_btn (gr.Button): the reset button
|
| 38 |
session_id (int): the session id
|
| 39 |
"""
|
| 40 |
+
yield (state_chatbot, disable_btn, disable_btn, session_id)
|
| 41 |
InterFace.async_engine.stop_session(session_id)
|
| 42 |
# pytorch backend does not support resume chat history now
|
| 43 |
if InterFace.async_engine.backend == 'pytorch':
|
| 44 |
+
yield (state_chatbot, disable_btn, enable_btn, session_id)
|
| 45 |
else:
|
| 46 |
with InterFace.lock:
|
| 47 |
InterFace.global_session_id += 1
|