Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
Clémentine
commited on
Commit
•
9f4d66f
1
Parent(s):
7c4c8b4
fixed error message
Browse files
src/submission/check_validity.py
CHANGED
@@ -62,7 +62,7 @@ def is_model_on_hub(model_name: str, revision: str, token: str = None, trust_rem
|
|
62 |
except Exception as e:
|
63 |
if "You are trying to access a gated repo." in str(e):
|
64 |
return True, "uses a gated model.", None
|
65 |
-
return False, "was not found on hub!", None
|
66 |
|
67 |
def get_model_size(model_info: ModelInfo, precision: str):
|
68 |
size_pattern = re.compile(r"(\d+\.)?\d+(b|m)")
|
|
|
62 |
except Exception as e:
|
63 |
if "You are trying to access a gated repo." in str(e):
|
64 |
return True, "uses a gated model.", None
|
65 |
+
return False, f"was not found or misconfigured on the hub! Error raised was {e.args[0]}", None
|
66 |
|
67 |
def get_model_size(model_info: ModelInfo, precision: str):
|
68 |
size_pattern = re.compile(r"(\d+\.)?\d+(b|m)")
|