1// Step 1: Create an image classifier with MobileNet
2const classifier = ml5.imageClassifier("MobileNet", onModelReady);
3
4// Step 2: select an image
5const img = document.querySelector("#myImage");
6
7// Step 3: Make a prediction
8let prediction = classifier.predict(img, gotResults);
9
10// Step 4: Do something with the results!
11function gotResults(err, results) {
12 console.log(results);
13 // all the amazing things you'll add
14}