Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -227,10 +227,21 @@ with gr.Blocks(css=".chatbox {height: 400px; overflow-y: auto; border: 1px solid
|
|
227 |
if authorize(user, api_key, PRIMARY_SYSTEM_INSTRUCTIONS):
|
228 |
gr.Info("Loading, please wait.")
|
229 |
messages_html, history = load_conversation(api_key)
|
230 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
231 |
else:
|
232 |
gr.Warning("Incorrect userid/token")
|
233 |
-
return
|
|
|
|
|
|
|
|
|
234 |
|
235 |
def save_custom_instructions(api_key, custom_instructions):
|
236 |
if api_key in sessions:
|
|
|
227 |
if authorize(user, api_key, PRIMARY_SYSTEM_INSTRUCTIONS):
|
228 |
gr.Info("Loading, please wait.")
|
229 |
messages_html, history = load_conversation(api_key)
|
230 |
+
|
231 |
+
return (
|
232 |
+
gr.update(visible=False),
|
233 |
+
gr.update(visible=True),
|
234 |
+
messages_html,
|
235 |
+
history,
|
236 |
+
gr.HTML("<script>Scrolldown();</script>")
|
237 |
+
)
|
238 |
else:
|
239 |
gr.Warning("Incorrect userid/token")
|
240 |
+
return (
|
241 |
+
gr.update(visible=True),
|
242 |
+
gr.update(visible=False),
|
243 |
+
auth_status.update(value="Invalid userid/token")
|
244 |
+
)
|
245 |
|
246 |
def save_custom_instructions(api_key, custom_instructions):
|
247 |
if api_key in sessions:
|