I am getting the following errors when I am trying to load a Model, which I trained in Python, when I use the loadModel() function tensorflow.js:
Failed to load resource: net::ERR_NAME_NOT_RESOLVED
Uncaught (in promise) TypeError: Failed to fetch
Below is the predict.js file
console.log ("hello");
let model;
(async function () {
model = await tf.loadModel("http://keras_model/model.json");
$(".progress-bar").hide();
console.log("it works");
})();
The directory structure:
main
-dataset (contains images for training the model)
-training_scripts (python scripts to train the model)
-user_interface
--server.js (server made using node.js(and express))
--static (this folder contains the trained keras model)
--index.html (html file to be served)
--predict.js
--keras_model(this folder contains the model.json file)
Any help will be appreciated!!
http://as file typefile:///Fetch API cannot load file:///keras_model/model.json. URL scheme must be "http" or "https" for CORS request.Do I have to use absolute path here too??tfjs-node?