samsl commited on
Commit
51bfbf2
·
1 Parent(s): 05df4cd

update oauth scope in readme

Browse files
Files changed (2) hide show
  1. README.md +5 -0
  2. app.py +2 -1
README.md CHANGED
@@ -10,6 +10,11 @@ app_file: app.py
10
  pinned: true
11
  license: mit
12
  hf_oauth: true
 
 
 
 
 
13
  short_description: Fast structural heterogeneity estimation
14
  ---
15
 
 
10
  pinned: true
11
  license: mit
12
  hf_oauth: true
13
+ hf_oauth_expiration_minutes: 480
14
+ hf_oauth_scopes:
15
+ - read-repos
16
+ - write-repos
17
+ - manage-repos
18
  short_description: Fast structural heterogeneity estimation
19
  ---
20
 
app.py CHANGED
@@ -128,7 +128,7 @@ def predict_rocketshp(
128
  logger.info(f"model variant: {model_variant}")
129
 
130
  is_authorized, token = check_user_access(token)
131
- logger.info(is_authorized)
132
  if not is_authorized:
133
  raise gr.Error("Failed to authorize repository access.")
134
 
@@ -424,6 +424,7 @@ def visualize_network(
424
 
425
  def check_user_access(token: gr.OAuthToken | None):
426
  """Check if user is logged in and has access to private repo"""
 
427
  if token is None:
428
  raise gr.Error("Please log in to use this Space")
429
 
 
128
  logger.info(f"model variant: {model_variant}")
129
 
130
  is_authorized, token = check_user_access(token)
131
+ logger.info(f"User is authorized: {is_authorized}")
132
  if not is_authorized:
133
  raise gr.Error("Failed to authorize repository access.")
134
 
 
424
 
425
  def check_user_access(token: gr.OAuthToken | None):
426
  """Check if user is logged in and has access to private repo"""
427
+
428
  if token is None:
429
  raise gr.Error("Please log in to use this Space")
430