Spaces:
Running
Running
Update apps/agents/agents.py
Browse files- apps/agents/agents.py +4 -12
apps/agents/agents.py
CHANGED
@@ -487,18 +487,10 @@ def construct_ui(blocks, api_key: Optional[str] = None) -> None:
|
|
487 |
chatbot, progress_sl],
|
488 |
queue=False) \
|
489 |
.then(role_playing_chat_init, session_state,
|
490 |
-
[session_state, chatbot, progress_sl], queue=False)
|
491 |
-
|
492 |
-
|
493 |
-
|
494 |
-
role_playing_chat_cont,
|
495 |
-
inputs=[session_state],
|
496 |
-
outputs=[session_state, chatbot, progress_sl, start_bn]
|
497 |
-
).then(
|
498 |
-
lambda: gr.update(visible=False, value=None) # Hide the button
|
499 |
-
).then(
|
500 |
-
lambda: gr.update(visible=True) # Show the button again after a delay
|
501 |
-
)
|
502 |
|
503 |
clear_bn.click(stop_session, session_state,
|
504 |
[session_state, progress_sl, start_bn])
|
|
|
487 |
chatbot, progress_sl],
|
488 |
queue=False) \
|
489 |
.then(role_playing_chat_init, session_state,
|
490 |
+
[session_state, chatbot, progress_sl], queue=False) \
|
491 |
+
.then(role_playing_chat_cont, session_state,
|
492 |
+
[session_state, chatbot, progress_sl, start_bn],
|
493 |
+
every=1)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
494 |
|
495 |
clear_bn.click(stop_session, session_state,
|
496 |
[session_state, progress_sl, start_bn])
|