This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const tf = require('@tensorflow/tfjs-node'); | |
const Jimp = require('jimp'); | |
// Directory path for model files (model.json, metadata.json, weights.bin) | |
// NOTE: It can be obtained from [Export Model] -> [Tensorflow.js] -> [Download my model] | |
// on https://teachablemachine.withgoogle.com/train/image | |
const MODEL_DIR_PATH = `${__dirname}`; | |
// Path for image file to predict class | |
const IMAGE_FILE_PATH = `${__dirname}/example.jpg`; |