Spaces:
Runtime error
Runtime error
show gated
Browse files
src/submission/check_validity.py
CHANGED
|
@@ -55,7 +55,7 @@ def is_model_on_hub(model_name: str, revision: str, token: str = None, trust_rem
|
|
| 55 |
)
|
| 56 |
|
| 57 |
except OSError as e:
|
| 58 |
-
if "You are trying to access a gated repo." in str(e):
|
| 59 |
return True, None, None
|
| 60 |
return False, f"raised an OSError: {e}", None
|
| 61 |
|
|
|
|
| 55 |
)
|
| 56 |
|
| 57 |
except OSError as e:
|
| 58 |
+
if "You are trying to access a gated repo." in str(e) or "We couldn't connect to 'https://huggingface.co' to load this file" in str(e):
|
| 59 |
return True, None, None
|
| 60 |
return False, f"raised an OSError: {e}", None
|
| 61 |
|