Update index.html
Browse files- 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
|
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
|