Spaces:
Running
Running
Update index.html
Browse files- 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 |
-
|
184 |
-
|
|
|
|
|
|
|
|
|
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 |
|