atlury commited on
Commit
c2e9649
·
verified ·
1 Parent(s): 1141286

Update index.html

Browse files
Files changed (1) hide show
  1. index.html +6 -2
index.html CHANGED
@@ -180,8 +180,12 @@
180
  import { pipeline, env } from 'https://cdn.jsdelivr.net/npm/@xenova/[email protected]';
181
 
182
  env.localModelPath = './models';
183
- //BELOW 3 statements added by RAHUL
184
- env.env.backends = ['wasm'];
 
 
 
 
185
  env.wasm.simd = true; // Enable SIMD if available
186
  env.numThreads = navigator.hardwareConcurrency || 4; // Use available CPU cores
187
 
 
180
  import { pipeline, env } from 'https://cdn.jsdelivr.net/npm/@xenova/[email protected]';
181
 
182
  env.localModelPath = './models';
183
+
184
+ //BELOW 5 statements added by RAHUL
185
+ // Configure environment before initializing pipelines
186
+ env.backends = ['wasm'];
187
+ env.wasm = env.wasm || {};
188
+ env.wasm.wasmPaths = 'https://cdn.jsdelivr.net/npm/@xenova/[email protected]/'; // Ensure correct WASM paths
189
  env.wasm.simd = true; // Enable SIMD if available
190
  env.numThreads = navigator.hardwareConcurrency || 4; // Use available CPU cores
191