I'm trying to classify maize leaf diseases using a react native cli offline. l used teachable machine to train a simple machine learning model for 4 classes and have downloaded the tensorflow.js format model(model.json and weights.bin files).
I'm using this code to load my model from medium Google
const modelJSON = require('../assets/model.json');
const modelWeights = require('../assets/weights.bin');
const loadModel = async()=>{
//.ts: const loadModel = async ():Promise<void|tf.LayersModel>=>{
const model = await tf.loadLayersModel(bundleResourceIO(modelJSON, modelWeights)
).catch((e)=>{
console.log("[LOADING ERROR] info:",e)
})
return model
}
In doing so I'm getting this error
Error: Cannot find native module 'ExponentGLObjectManager', js engine: hermes at Jsonload (http://localhost:8081/index.bundle//&platform=android&dev=true&lazy=true&minify=false&app=com.bestproject&modulesOnly=false&runModule=true:314338:41)
I have tried different ways of loading the model but l had the same error message.