To give birth to this app, we will count on ml5.js which is a library.
This library is the best way to start dealing with artificial intelligence.
Then, we're going to use a function found on ml5js.org called imageClassifier() on which you can find all the information you need by clicking on the following link
the official ml5 website. This will allow the AI to recognize the content of an image as if it had created all the colors of the world.
First of all, as you will use content from the library you have to make reference to it in the html sheet the way you can see in the following image :