Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
async function run() {
const model = await automl.loadImageClassification(MODEL_URL);
const image = document.getElementById('daisy');
const predictions = await model.classify(image);
// Show the resulting object on the page.
const pre = document.createElement('pre');
pre.textContent = JSON.stringify(predictions, null, 2);
document.body.append(pre);
}