Move Tensorflow models into assets

This commit is contained in:
Dragon Fire
2024-05-13 23:16:15 -04:00
parent 0d6c4aa5d5
commit 22ee2a5497
14 changed files with 2 additions and 2 deletions
+2 -2
View File
@@ -29,7 +29,7 @@ module.exports = class Tensorflow {
async loadStyleModel() { async loadStyleModel() {
const model = await tf.loadGraphModel( const model = await tf.loadGraphModel(
url.pathToFileURL(path.join(__dirname, '..', 'tf_models', 'style_js', 'model.json')).href url.pathToFileURL(path.join(__dirname, '..', 'assets', 'tensorflow', 'style_js', 'model.json')).href
); );
this.styleModel = model; this.styleModel = model;
return this.styleModel; return this.styleModel;
@@ -37,7 +37,7 @@ module.exports = class Tensorflow {
async loadTransformerModel() { async loadTransformerModel() {
const model = await tf.loadGraphModel( const model = await tf.loadGraphModel(
url.pathToFileURL(path.join(__dirname, '..', 'tf_models', 'transformer_js', 'model.json')).href url.pathToFileURL(path.join(__dirname, '..', 'assets', 'tensorflow', 'transformer_js', 'model.json')).href
); );
this.transformerModel = model; this.transformerModel = model;
return this.transformerModel; return this.transformerModel;