Building Your Drawing Recognition Web App

In this unit, you will take your first steps toward building a web app that can recognize what you draw. If you have ever used a drawing app or played with AI that guesses your doodles, you already have an idea of what we are aiming for. Here, you will learn how to set up the basic structure of such an app using Flask, a popular web framework for Python.

What You'll Learn

You will learn how to:

  • Set up a simple Flask application that serves a web page.
  • Create a basic HTML template with a drawing canvas using the <canvas> element.
  • Connect your Python backend to your web page so you can later add drawing recognition features.
  • Prepare your app to handle user drawings and send them to the backend for processing.

Here is a quick look at the kind of code you will be working with:

And the HTML template:

But soon, you’ll be adding more! For example, you’ll learn how to let users draw on the canvas and send their drawing to the backend:

And in your Flask route, you’ll be able to receive and process the drawing:

You’ll also see how to display the AI’s guess and confidence right on the page:

Why This Is Exciting

Building a web app that can recognize your drawings is a great way to combine web development and artificial intelligence. By the end of this unit, you will have a working web page with a drawing area — ready for you to add more advanced features. This is a practical skill that is used in many real-world applications, from educational tools to creative games.

Let’s get started and build the first piece of your drawing recognition app!

Sign up
Join the 1M+ learners on CodeSignal
Be a part of our community of 1M+ users who develop and demonstrate their skills on CodeSignal