Spaces:
Running
Running
Revert
Browse files
app.py
CHANGED
|
@@ -75,7 +75,7 @@ class DynamicState:
|
|
| 75 |
self.label_passthrough = False
|
| 76 |
return output
|
| 77 |
|
| 78 |
-
def reset_workspace(self
|
| 79 |
"""重置工作区状态"""
|
| 80 |
self.stream_completed = False
|
| 81 |
self.should_stream = False
|
|
@@ -84,7 +84,7 @@ class DynamicState:
|
|
| 84 |
return self.ui_state_controller() + (
|
| 85 |
"",
|
| 86 |
"",
|
| 87 |
-
LANGUAGE_CONFIG["en"]["bot_default"]
|
| 88 |
)
|
| 89 |
|
| 90 |
|
|
@@ -427,7 +427,7 @@ with gr.Blocks(theme=theme, css_paths="styles.css") as demo:
|
|
| 427 |
)
|
| 428 |
|
| 429 |
next_turn_btn.click(
|
| 430 |
-
lambda d: d.reset_workspace(
|
| 431 |
[dynamic_state],
|
| 432 |
stateful_ui + (thought_editor, prompt_input, chatbot),
|
| 433 |
concurrency_limit=None,
|
|
|
|
| 75 |
self.label_passthrough = False
|
| 76 |
return output
|
| 77 |
|
| 78 |
+
def reset_workspace(self):
|
| 79 |
"""重置工作区状态"""
|
| 80 |
self.stream_completed = False
|
| 81 |
self.should_stream = False
|
|
|
|
| 84 |
return self.ui_state_controller() + (
|
| 85 |
"",
|
| 86 |
"",
|
| 87 |
+
LANGUAGE_CONFIG["en"]["bot_default"],
|
| 88 |
)
|
| 89 |
|
| 90 |
|
|
|
|
| 427 |
)
|
| 428 |
|
| 429 |
next_turn_btn.click(
|
| 430 |
+
lambda d: d.reset_workspace(),
|
| 431 |
[dynamic_state],
|
| 432 |
stateful_ui + (thought_editor, prompt_input, chatbot),
|
| 433 |
concurrency_limit=None,
|