Spaces:
Runtime error
Runtime error
AIMage2024
commited on
Commit
•
0768399
1
Parent(s):
e613737
Update gradio_app.py
Browse files- 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 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
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()
|