shideqin commited on
Commit
a892961
1 Parent(s): 1e7ac83

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -6
app.py CHANGED
@@ -273,7 +273,6 @@ with gr.Blocks(
273
 
274
  keyTxt.submit(submit_key, keyTxt, [user_api_key, status_display])
275
  keyTxt.change(submit_key, keyTxt, [user_api_key, status_display])
276
- user_api_key = user_api_key or os.environ.get("OPENAI_API_KEY", "")
277
  # Chatbot
278
  user_input.submit(
279
  predict,
@@ -436,12 +435,9 @@ if __name__ == "__main__":
436
  # if running in Docker
437
  if dockerflag:
438
  if authflag:
439
- demo.queue().launch(
440
- server_name="0.0.0.0", server_port=7860, auth=(username, password),
441
- favicon_path="./assets/favicon.png"
442
- )
443
  else:
444
- demo.queue().launch(server_name="0.0.0.0", server_port=7860, share=False, favicon_path="./assets/favicon.png")
445
  # if not running in Docker
446
  else:
447
  if authflag:
 
273
 
274
  keyTxt.submit(submit_key, keyTxt, [user_api_key, status_display])
275
  keyTxt.change(submit_key, keyTxt, [user_api_key, status_display])
 
276
  # Chatbot
277
  user_input.submit(
278
  predict,
 
435
  # if running in Docker
436
  if dockerflag:
437
  if authflag:
438
+ demo.queue().launch(auth=(username, password), favicon_path="./assets/favicon.png")
 
 
 
439
  else:
440
+ demo.queue().launch(share=False, favicon_path="./assets/favicon.png")
441
  # if not running in Docker
442
  else:
443
  if authflag: