NyxKrage commited on
Commit
e496e38
·
verified ·
1 Parent(s): a017d2a

Update index.html

Browse files
Files changed (1) hide show
  1. index.html +4 -1
index.html CHANGED
@@ -85,8 +85,11 @@
85
  let configRes = await fetch(
86
  `https://huggingface.co/${hf_model}/raw/main/config.json`, auth
87
  )
 
 
 
88
  if (configRes.status === 403) {
89
- throw new Error("Model is either private or gated and you have not provided an access token or the provided access token does not have access to the repo")
90
  }
91
  let config = await configRes.json()
92
  let model_size = 0
 
85
  let configRes = await fetch(
86
  `https://huggingface.co/${hf_model}/raw/main/config.json`, auth
87
  )
88
+ if (configRes.status === 401) {
89
+ throw new Error("Model is either private or gated, you must provide an access token")
90
+ }
91
  if (configRes.status === 403) {
92
+ throw new Error("Model is either private or gated and provided access token does not have access to the repo")
93
  }
94
  let config = await configRes.json()
95
  let model_size = 0