Update index.html
Browse files- index.html +2 -2
index.html
CHANGED
@@ -72,13 +72,13 @@
|
|
72 |
let model_size = 0
|
73 |
try {
|
74 |
model_size = (await fetch(`https://huggingface.co/${hf_model}/raw/main/model.safetensors.index.json`).then(r => r.json()))["metadata"]["total_size"] / 2
|
75 |
-
if (model_size
|
76 |
throw new Erorr("no size in safetensors metadata")
|
77 |
}
|
78 |
} catch (e) {
|
79 |
try {
|
80 |
model_size = (await fetch(`https://huggingface.co/${hf_model}/raw/main/pytorch_model.bin.index.json`).then(r => r.json()))["metadata"]["total_size"] / 2
|
81 |
-
if (model_size
|
82 |
throw new Erorr("no size in pytorch metadata")
|
83 |
}
|
84 |
} catch {
|
|
|
72 |
let model_size = 0
|
73 |
try {
|
74 |
model_size = (await fetch(`https://huggingface.co/${hf_model}/raw/main/model.safetensors.index.json`).then(r => r.json()))["metadata"]["total_size"] / 2
|
75 |
+
if (isNaN(model_size)) {
|
76 |
throw new Erorr("no size in safetensors metadata")
|
77 |
}
|
78 |
} catch (e) {
|
79 |
try {
|
80 |
model_size = (await fetch(`https://huggingface.co/${hf_model}/raw/main/pytorch_model.bin.index.json`).then(r => r.json()))["metadata"]["total_size"] / 2
|
81 |
+
if (isNaN(model_size)) {
|
82 |
throw new Erorr("no size in pytorch metadata")
|
83 |
}
|
84 |
} catch {
|