Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
Clémentine
commited on
Commit
•
ccefec9
1
Parent(s):
002172c
fix value error in param size
Browse files
scripts/create_request_file.py
CHANGED
@@ -20,7 +20,7 @@ def get_model_size(model_info, precision: str):
|
|
20 |
size_pattern = size_pattern = re.compile(r"(\d\.)?\d+(b|m)")
|
21 |
try:
|
22 |
model_size = round(model_info.safetensors["total"] / 1e9, 3)
|
23 |
-
except AttributeError:
|
24 |
try:
|
25 |
size_match = re.search(size_pattern, model_info.modelId.lower())
|
26 |
model_size = size_match.group(0)
|
|
|
20 |
size_pattern = size_pattern = re.compile(r"(\d\.)?\d+(b|m)")
|
21 |
try:
|
22 |
model_size = round(model_info.safetensors["total"] / 1e9, 3)
|
23 |
+
except (AttributeError, TypeError):
|
24 |
try:
|
25 |
size_match = re.search(size_pattern, model_info.modelId.lower())
|
26 |
model_size = size_match.group(0)
|
src/submission/check_validity.py
CHANGED
@@ -55,7 +55,7 @@ def get_model_size(model_info: ModelInfo, precision: str):
|
|
55 |
size_pattern = size_pattern = re.compile(r"(\d\.)?\d+(b|m)")
|
56 |
try:
|
57 |
model_size = round(model_info.safetensors["total"] / 1e9, 3)
|
58 |
-
except AttributeError:
|
59 |
try:
|
60 |
size_match = re.search(size_pattern, model_info.modelId.lower())
|
61 |
model_size = size_match.group(0)
|
|
|
55 |
size_pattern = size_pattern = re.compile(r"(\d\.)?\d+(b|m)")
|
56 |
try:
|
57 |
model_size = round(model_info.safetensors["total"] / 1e9, 3)
|
58 |
+
except (AttributeError, TypeError):
|
59 |
try:
|
60 |
size_match = re.search(size_pattern, model_info.modelId.lower())
|
61 |
model_size = size_match.group(0)
|