Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -177,10 +177,11 @@ with gr.Blocks(css=css) as demo:
|
|
177 |
regen_btn.click(lambda _: ("", []), outputs=[chatbot_output, history_state])
|
178 |
|
179 |
auth_button.click(
|
180 |
-
lambda user, key: (authorize(user, key, PRIMARY_SYSTEM_INSTRUCTIONS)
|
181 |
inputs=[api_user_input, api_key_input],
|
182 |
-
outputs=[
|
183 |
)
|
|
|
184 |
save_instructions_btn.click(
|
185 |
lambda key, instructions: ("", ""),
|
186 |
inputs=[api_key_input, system_instructions_input],
|
|
|
177 |
regen_btn.click(lambda _: ("", []), outputs=[chatbot_output, history_state])
|
178 |
|
179 |
auth_button.click(
|
180 |
+
lambda user, key: ("Authorized" if authorize(user, key, PRIMARY_SYSTEM_INSTRUCTIONS) else "Authorization Failed"),
|
181 |
inputs=[api_user_input, api_key_input],
|
182 |
+
outputs=[auth_status],
|
183 |
)
|
184 |
+
|
185 |
save_instructions_btn.click(
|
186 |
lambda key, instructions: ("", ""),
|
187 |
inputs=[api_key_input, system_instructions_input],
|