Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -145,6 +145,20 @@ def chat_batch(
|
|
| 145 |
def reset_textbox():
|
| 146 |
return gr.Textbox.update(value='')
|
| 147 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 148 |
with gr.Blocks(css=PARENT_BLOCK_CSS) as demo:
|
| 149 |
state_chatbot = gr.State([])
|
| 150 |
|
|
|
|
| 145 |
def reset_textbox():
|
| 146 |
return gr.Textbox.update(value='')
|
| 147 |
|
| 148 |
+
def reset_everything(
|
| 149 |
+
context_txtbox,
|
| 150 |
+
instruction_txtbox,
|
| 151 |
+
state_chatbot):
|
| 152 |
+
|
| 153 |
+
state_chatbot = []
|
| 154 |
+
|
| 155 |
+
return (
|
| 156 |
+
state_chatbot,
|
| 157 |
+
state_chatbot,
|
| 158 |
+
gr.Textbox.update(value=''),
|
| 159 |
+
gr.Textbox.update(value=''),
|
| 160 |
+
)
|
| 161 |
+
|
| 162 |
with gr.Blocks(css=PARENT_BLOCK_CSS) as demo:
|
| 163 |
state_chatbot = gr.State([])
|
| 164 |
|