PeterPinetree commited on
Commit
65b682e
·
verified ·
1 Parent(s): 5832682

Update index.html

Browse files
Files changed (1) hide show
  1. 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('https://cdn.jsdelivr.net/npm/@xenova/transformers@2.17.2');
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');