Spaces:
Running
Running
Update index.html
Browse files- index.html +2 -1
index.html
CHANGED
@@ -88,11 +88,12 @@
|
|
88 |
<script type="module">
|
89 |
// Prefer keeping all requests on huggingface.co to avoid CORS/VPN issues.
|
90 |
// Option 1 (simple): CDN import (works on many networks)
|
91 |
-
const tf = await import('
|
92 |
// Option 2 (bulletproof): self-host the file in your Space and use:
|
93 |
// const tf = await import('./assets/vendor/transformers.min.js');
|
94 |
|
95 |
tf.env.useBrowserCache = true;
|
|
|
96 |
|
97 |
const $ = s => document.querySelector(s);
|
98 |
const modelSel = $('#model');
|
|
|
88 |
<script type="module">
|
89 |
// Prefer keeping all requests on huggingface.co to avoid CORS/VPN issues.
|
90 |
// Option 1 (simple): CDN import (works on many networks)
|
91 |
+
const tf = await import('./assets/vendor/transformers.min.js');
|
92 |
// Option 2 (bulletproof): self-host the file in your Space and use:
|
93 |
// const tf = await import('./assets/vendor/transformers.min.js');
|
94 |
|
95 |
tf.env.useBrowserCache = true;
|
96 |
+
tf.env.allowLocalModels = true; // <-- REQUIRED for local folder paths
|
97 |
|
98 |
const $ = s => document.querySelector(s);
|
99 |
const modelSel = $('#model');
|