Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -382,21 +382,17 @@ with gr.Blocks(css="constants/styles.css", theme=gr.themes.Soft()) as demo:
|
|
| 382 |
chat_event = prompt_txtbox.submit(
|
| 383 |
before_chat_begin, None, [close, reset, regen],
|
| 384 |
concurrency_limit=20,
|
| 385 |
-
)
|
| 386 |
-
|
| 387 |
-
chat_event2 = chat_event.then(
|
| 388 |
chat_stream,
|
| 389 |
[cur_arxiv_id, local_data, prompt_txtbox, chat_state],
|
| 390 |
[prompt_txtbox, chatbot, local_data, close, reset, regen],
|
| 391 |
concurrency_limit=20,
|
| 392 |
-
)
|
| 393 |
-
|
| 394 |
-
chat_event3 = chat_event2.then(
|
| 395 |
None, [cur_arxiv_id, local_data], None,
|
| 396 |
js=UPDATE_CHAT_HISTORY
|
| 397 |
)
|
| 398 |
|
| 399 |
-
close.click(None, None, None, cancels=[chat_event
|
| 400 |
|
| 401 |
reset.click(
|
| 402 |
before_chat_begin, None, [close, reset, regen],
|
|
|
|
| 382 |
chat_event = prompt_txtbox.submit(
|
| 383 |
before_chat_begin, None, [close, reset, regen],
|
| 384 |
concurrency_limit=20,
|
| 385 |
+
).then(
|
|
|
|
|
|
|
| 386 |
chat_stream,
|
| 387 |
[cur_arxiv_id, local_data, prompt_txtbox, chat_state],
|
| 388 |
[prompt_txtbox, chatbot, local_data, close, reset, regen],
|
| 389 |
concurrency_limit=20,
|
| 390 |
+
).then(
|
|
|
|
|
|
|
| 391 |
None, [cur_arxiv_id, local_data], None,
|
| 392 |
js=UPDATE_CHAT_HISTORY
|
| 393 |
)
|
| 394 |
|
| 395 |
+
close.click(None, None, None, cancels=[chat_event])
|
| 396 |
|
| 397 |
reset.click(
|
| 398 |
before_chat_begin, None, [close, reset, regen],
|