update
Browse files
index.js
CHANGED
@@ -1,5 +1,9 @@
|
|
|
|
|
|
1 |
import { env, pipeline } from "@xenova/transformers";
|
2 |
|
|
|
|
|
3 |
env.localModelPath = __dirname + '/model'
|
4 |
|
5 |
let pipe = null;
|
|
|
1 |
+
import path from 'path';
|
2 |
+
import { fileURLToPath } from 'url';
|
3 |
import { env, pipeline } from "@xenova/transformers";
|
4 |
|
5 |
+
const __filename = fileURLToPath(import.meta.url);
|
6 |
+
const __dirname = path.dirname(__filename);
|
7 |
env.localModelPath = __dirname + '/model'
|
8 |
|
9 |
let pipe = null;
|