<aside> <img src="/icons/book-closed_purple.svg" alt="/icons/book-closed_purple.svg" width="40px" />
</aside>
Dora Do - creative technologist / educator - doradocodes.com
By the end of the workshop, participants will:
Machine learning is teaching a computer to recognize patterns from examples
An analogy: you are teaching a friend to recognize a cat using lots of pictures of cats
Teachable Machine is a tool that makes creating machine learning models easily
It’s not magic — it’s patterns and probability



<script src="<https://unpkg.com/ml5@1/dist/ml5.min.js>"></script> to the index.html file.function preload() {
classifier = ml5.imageClassifier("MobileNet");
img = loadImage("bubbles.jpg");
}
function setup() {
createCanvas(400, 500);
classifier.classify(img, gotResult);
}
function draw() {
clear();
image(img, 0, 0, width, height);
fill(255, 0, 0);
textSize(14);
text(displayText, 20, 30);
}
function gotResult(results) {
console.log(results);
displayText = '';
for (let i = 0; i < results.length; i++) {
displayText += results[i].label + '\\n';
}
}
OR duplicate this starter code: https://editor.p5js.org/doradocodes/sketches/IK5ru2Hi3