NyxKrage commited on
Commit
cb7ca95
1 Parent(s): f6519fe

Update index.html

Browse files
Files changed (1) hide show
  1. 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 === undefined) {
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 === undefined) {
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 {