Spaces:
Sleeping
Sleeping
mattiashallberg
commited on
Commit
•
bea8b58
1
Parent(s):
9b1c0c9
Update app.py
Browse files
app.py
CHANGED
@@ -5,14 +5,7 @@ import os
|
|
5 |
# HF_TOKEN = os.environ.get('HUGGING_FACE_HUB_TOKEN')
|
6 |
HF_TOKEN = os.environ.get('hf_access_to_private_space2')
|
7 |
|
8 |
-
def environ_auth(username, password
|
9 |
-
if request:
|
10 |
-
print("Request headers dictionary:", request.headers)
|
11 |
-
print("IP address:", request.client.host)
|
12 |
-
print("Username:", request.username)
|
13 |
-
print("Query parameters:", dict(request.query_params))
|
14 |
-
print("Session hash:", request.session_hash)
|
15 |
-
|
16 |
if username == os.environ.get('mattias_hallberg') and password == os.environ.get('mattias_hallberg_password'):
|
17 |
return True
|
18 |
elif username == os.environ.get('michal_gradshtein') and password == os.environ.get('michal_gradshtein_password'):
|
|
|
5 |
# HF_TOKEN = os.environ.get('HUGGING_FACE_HUB_TOKEN')
|
6 |
HF_TOKEN = os.environ.get('hf_access_to_private_space2')
|
7 |
|
8 |
+
def environ_auth(username, password):
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9 |
if username == os.environ.get('mattias_hallberg') and password == os.environ.get('mattias_hallberg_password'):
|
10 |
return True
|
11 |
elif username == os.environ.get('michal_gradshtein') and password == os.environ.get('michal_gradshtein_password'):
|