Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -378,7 +378,7 @@ with gr.Blocks(css="constants/styles.css", theme=gr.themes.Soft()) as demo:
|
|
378 |
|
379 |
chat_button.click(None, [cur_arxiv_id], [local_data, chatbot], js=OPEN_CHAT_IF)
|
380 |
|
381 |
-
|
382 |
before_chat_begin, None, [close, reset, regen],
|
383 |
concurrency_limit=20,
|
384 |
).then(
|
@@ -386,15 +386,12 @@ with gr.Blocks(css="constants/styles.css", theme=gr.themes.Soft()) as demo:
|
|
386 |
[cur_arxiv_id, local_data, prompt_txtbox, chat_state],
|
387 |
[prompt_txtbox, chatbot, local_data, close, reset, regen],
|
388 |
concurrency_limit=20, queue=True
|
389 |
-
)
|
390 |
-
|
391 |
-
prompt_txtbox.submit(
|
392 |
None, [cur_arxiv_id, local_data], None,
|
393 |
js=UPDATE_CHAT_HISTORY
|
394 |
)
|
395 |
|
396 |
close.click(None, None, None,js=CLOSE_CHAT_IF)
|
397 |
-
close.click(None, None, None, cancels=[chat_event], concurrency_limit=20, queue=True)
|
398 |
|
399 |
reset.click(
|
400 |
before_chat_begin, None, [close, reset, regen],
|
|
|
378 |
|
379 |
chat_button.click(None, [cur_arxiv_id], [local_data, chatbot], js=OPEN_CHAT_IF)
|
380 |
|
381 |
+
prompt_txtbox.submit(
|
382 |
before_chat_begin, None, [close, reset, regen],
|
383 |
concurrency_limit=20,
|
384 |
).then(
|
|
|
386 |
[cur_arxiv_id, local_data, prompt_txtbox, chat_state],
|
387 |
[prompt_txtbox, chatbot, local_data, close, reset, regen],
|
388 |
concurrency_limit=20, queue=True
|
389 |
+
).then(
|
|
|
|
|
390 |
None, [cur_arxiv_id, local_data], None,
|
391 |
js=UPDATE_CHAT_HISTORY
|
392 |
)
|
393 |
|
394 |
close.click(None, None, None,js=CLOSE_CHAT_IF)
|
|
|
395 |
|
396 |
reset.click(
|
397 |
before_chat_begin, None, [close, reset, regen],
|