Skip to content

Commit ad491f0

Browse files
skip models which require authorization
Signed-off-by: Avinash Singh <[email protected]>
1 parent d548774 commit ad491f0

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

contrib/scripts/select-top-models.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,11 @@ def is_compatible_model(api: HfApi, model_id: str, max_size_gb: float = 20.0) ->
165165
print(f"Skipping {model_id}: Could not fetch model info: {e}", file=sys.stderr)
166166
return False, None
167167

168+
# Skip gated models that require authorization
169+
if getattr(model_info, 'gated', False):
170+
print(f"Skipping {model_id}: Model is gated and requires authorization", file=sys.stderr)
171+
return False, None
172+
168173
# Check for config.json
169174
if not has_config_json(model_info):
170175
print(f"Skipping {model_id}: No config.json", file=sys.stderr)

0 commit comments

Comments
 (0)