Troubleshooting transformer not loading on rpi4-1
This commit is contained in:
parent
8aa28fb557
commit
41fb1274f1
@ -1,13 +1,19 @@
|
||||
// Import dotenv file if not in production
|
||||
if (process.env.NODE_ENV !== "production") {
|
||||
require("dotenv").config();
|
||||
}
|
||||
|
||||
const {env, pipeline} = require("@xenova/transformers");
|
||||
const path = require("path");
|
||||
env.allowRemoteModels = false;
|
||||
env.localModelPath = path.resolve(__dirname, "./models/transformers").replace(/\\/g, "/");
|
||||
env.backends.onnx.wasm.proxy = false;
|
||||
env.backends.onnx.wasm.numThreads = 1;
|
||||
|
||||
// Import dotenv file if not in production
|
||||
if (process.env.NODE_ENV !== "production") {
|
||||
require("dotenv").config();
|
||||
env.localModelPath = path.resolve(__dirname, "./models/transformers").replace(/\\/g, "/");
|
||||
} else {
|
||||
env.localModelPath = "/app/src/models/transformers";
|
||||
}
|
||||
console.log(process.platform, process.arch, process.version);
|
||||
console.log(env.localModelPath);
|
||||
|
||||
|
||||
const models = require("./models");
|
||||
const db = models.db;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user