mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-03 23:36:43 +02:00
Move Tensorflow models into assets
This commit is contained in:
@@ -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;
|
||||||
|
|||||||
Reference in New Issue
Block a user