i am new to Tensorflow.js so, i don't quite understand it completely. I have trained an object detection model using Azure Custom Vision (customvision.ai) and as described in there documentation i exported the model for Tensorflow.js for offline use in my Node.js Project.
They have a very brief guide on Github (https://github.com/microsoft/customvision-tfjs) on how to use the model with Tensorflow.js, i tried following the steps but was not able to run it.
If anyone has experience with Tensorflow.js, please help me in this i am stuck on it for past 3 days.
This is the Code that i am trying to execute, i am getting Error
'await can only be used with async functions'
even though the loadModelAsync() function is Async.
const cvstfjs = require('@microsoft/customvision-tfjs');
let model = new cvstfjs.ObjectDetectionModel();
await model.loadModelAsync('model.json');
const image = document.getElementById('image');
const result = await model.executeAsync(image);