AIMage2024 commited on
Commit
0768399
1 Parent(s): e613737

Update gradio_app.py

Browse files
Files changed (1) hide show
  1. gradio_app.py +5 -7
gradio_app.py CHANGED
@@ -87,13 +87,11 @@ def get_parser():
87
  return parser
88
 
89
  def check_auth(username, password):
90
- print(username)
91
- print(password)
92
- print(os.getenv(username))
93
- print(os.getenv(username) == password)
94
- # if os.getenv(username) is not None:
95
- return os.getenv(username) == password
96
- # return False
97
  if __name__ == "__main__":
98
  parser = get_parser()
99
  args = parser.parse_args()
 
87
  return parser
88
 
89
  def check_auth(username, password):
90
+ if len(username) == 0: return False
91
+ user = os.getenv(username)
92
+ if user is None: return False
93
+ return user == password
94
+
 
 
95
  if __name__ == "__main__":
96
  parser = get_parser()
97
  args = parser.parse_args()