Update index.html
Browse files- index.html +2 -2
index.html
CHANGED
@@ -71,13 +71,13 @@
|
|
71 |
).then(r => r.json())
|
72 |
let model_size = 0
|
73 |
try {
|
74 |
-
model_size = (await fetch(`https://huggingface.co/${hf_model}/
|
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}/
|
81 |
if (isNaN(model_size)) {
|
82 |
throw new Erorr("no size in pytorch metadata")
|
83 |
}
|
|
|
71 |
).then(r => r.json())
|
72 |
let model_size = 0
|
73 |
try {
|
74 |
+
model_size = (await fetch(`https://huggingface.co/${hf_model}/resolve/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}/resolve/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 |
}
|