SushantGautam commited on
Commit
7d90ef2
·
1 Parent(s): 1d9823e

add error handling for granting access in task_1.py

Browse files
medvqa/competitions/gi-2025/task_1.py CHANGED
@@ -93,10 +93,11 @@ else:
93
  api.update_repo_visibility(args.repo_id, private=False) # Make public
94
  api.update_repo_settings(
95
  args.repo_id, gated='manual') # Enable gated access
96
-
97
  for user in HF_GATE_ACESSLIST:
98
- grant_access(args.repo_id, user) # Grant access
99
-
 
 
100
  print(
101
  f'''✅ {args.repo_id} model is now made public, but gated, and is shared with organizers.
102
  You should not make the model private or remove/update it until the competition results are announced.
 
93
  api.update_repo_visibility(args.repo_id, private=False) # Make public
94
  api.update_repo_settings(
95
  args.repo_id, gated='manual') # Enable gated access
 
96
  for user in HF_GATE_ACESSLIST:
97
+ try:
98
+ grant_access(args.repo_id, user) # Grant access
99
+ except Exception as e:
100
+ print(user, ":", e)
101
  print(
102
  f'''✅ {args.repo_id} model is now made public, but gated, and is shared with organizers.
103
  You should not make the model private or remove/update it until the competition results are announced.