chibop commited on
Commit
314ca3b
·
verified ·
1 Parent(s): d110365

Upload folder using huggingface_hub

Browse files
Files changed (1) hide show
  1. chat.py +4 -2
chat.py CHANGED
@@ -7,8 +7,10 @@ import base64
7
  import json
8
 
9
  def login(username, password):
10
- users = json.loads(os.environ.get('users'))
11
- return users[username] == password
 
 
12
 
13
  print("Start")
14
  client = OpenAI(api_key=api_key)
 
7
  import json
8
 
9
  def login(username, password):
10
+ try:
11
+ users = json.loads(os.environ.get('users'))
12
+ return users[username] == password
13
+ except: return False
14
 
15
  print("Start")
16
  client = OpenAI(api_key=api_key)