mattiashallberg commited on
Commit
9b1c0c9
1 Parent(s): bcb2615
Files changed (1) hide show
  1. app.py +8 -1
app.py CHANGED
@@ -5,7 +5,14 @@ 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 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'):
 
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, request: gr.Request):
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'):