RomZay commited on
Commit
e4acc40
·
verified ·
1 Parent(s): e3ea02b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +13 -2
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
- return gr.update(visible=False), gr.update(visible=True), messages_html, history
 
 
 
 
 
 
 
231
  else:
232
  gr.Warning("Incorrect userid/token")
233
- return gr.update(visible=True), gr.update(visible=False), auth_status.update(value="Invalid userid/token")
 
 
 
 
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: