ml5.js
also supports Promises. If no callback is provided to any asynchronous function then a Promise is returned.// No callback needs to be passed to use Promises.
ml5
.imageClassifier('MobileNet')
.then(classifier => classifier.predict(image))
.then((results) => {
// Do something with the results
});