Sarah Ciston
commited on
Commit
·
ea39f35
1
Parent(s):
1e67923
remove env var, test client secret window var
Browse files
sketch.js
CHANGED
@@ -16,9 +16,9 @@ if (!oauthResult) {
|
|
16 |
|
17 |
// You can use oauthResult.accessToken, oauthResult.accessTokenExpiresAt and oauthResult.userInfo
|
18 |
// console.log(oauthResult);
|
19 |
-
|
20 |
-
const HF_TOKEN = oauthResult.accessToken
|
21 |
-
|
22 |
|
23 |
import { HfInference } from 'https://esm.sh/@huggingface/inference';
|
24 |
const inference = new HfInference(HF_TOKEN);
|
@@ -28,7 +28,7 @@ const inference = new HfInference(HF_TOKEN);
|
|
28 |
// list of models by task: 'https://huggingface.co/docs/transformers.js/index#supported-tasksmodels'
|
29 |
|
30 |
// Since we will download the model from the Hugging Face Hub, we can skip the local model check
|
31 |
-
env.allowLocalModels = false;
|
32 |
|
33 |
///////// VARIABLES
|
34 |
|
|
|
16 |
|
17 |
// You can use oauthResult.accessToken, oauthResult.accessTokenExpiresAt and oauthResult.userInfo
|
18 |
// console.log(oauthResult);
|
19 |
+
const HF_TOKEN = window.huggingface.variables.OAUTH_CLIENT_SECRET
|
20 |
+
// const HF_TOKEN = oauthResult.accessToken
|
21 |
+
console.log(HF_TOKEN)
|
22 |
|
23 |
import { HfInference } from 'https://esm.sh/@huggingface/inference';
|
24 |
const inference = new HfInference(HF_TOKEN);
|
|
|
28 |
// list of models by task: 'https://huggingface.co/docs/transformers.js/index#supported-tasksmodels'
|
29 |
|
30 |
// Since we will download the model from the Hugging Face Hub, we can skip the local model check
|
31 |
+
// env.allowLocalModels = false;
|
32 |
|
33 |
///////// VARIABLES
|
34 |
|