Update app.py
Browse files
app.py
CHANGED
@@ -151,13 +151,13 @@ with gr.Blocks(css = """#col_container { margin-left: auto; margin-right: auto;}
|
|
151 |
inputs.submit( predict, [inputs, top_p, temperature, chat_counter, chatbot, state], [chatbot, state, chat_counter, server_status_code],) #openai_api_key
|
152 |
b1.click( predict, [inputs, top_p, temperature, chat_counter, chatbot, state], [chatbot, state, chat_counter, server_status_code],) #openai_api_key
|
153 |
|
154 |
-
inputs.submit(set_visible_false, [], [])
|
155 |
-
b1.click(set_visible_false, [], [])
|
156 |
-
inputs.submit(set_visible_true, [], [])
|
157 |
-
b1.click(set_visible_true, [], [])
|
158 |
|
159 |
-
b1.click(reset_textbox, [], [])
|
160 |
-
inputs.submit(reset_textbox, [], [])
|
161 |
|
162 |
#Examples
|
163 |
with gr.Accordion(label="Examples for System message:", open=False):
|
|
|
151 |
inputs.submit( predict, [inputs, top_p, temperature, chat_counter, chatbot, state], [chatbot, state, chat_counter, server_status_code],) #openai_api_key
|
152 |
b1.click( predict, [inputs, top_p, temperature, chat_counter, chatbot, state], [chatbot, state, chat_counter, server_status_code],) #openai_api_key
|
153 |
|
154 |
+
inputs.submit(set_visible_false, [], [system_msg])
|
155 |
+
b1.click(set_visible_false, [], [system_msg])
|
156 |
+
inputs.submit(set_visible_true, [], [accordion_msg])
|
157 |
+
b1.click(set_visible_true, [], [accordion_msg])
|
158 |
|
159 |
+
b1.click(reset_textbox, [], [inputs])
|
160 |
+
inputs.submit(reset_textbox, [], [inputs])
|
161 |
|
162 |
#Examples
|
163 |
with gr.Accordion(label="Examples for System message:", open=False):
|