Putting a web front-end on a Google Colab notebook

Let’s say you’re a data scientist, and you’ve been asked to classify iris flowers based on their measurements (using the famous iris dataset). You’ve written some code in a Colab notebook that solves the problem; however, what you really want is to build an interactive tool, so people can classify the flowers themselves!

In this short tutorial, we are going to build an interactive tool for people to classify iris flowers by connecting a web app to a Colab notebook. The web app will collect the iris measurements from the user, send the data to our Colab notebook, where it will be classified, and then send the classification back to our web app to display to the user.

Google Colab App Basic

For this tutorial, you will need to know basic Python and have an understanding of how to use Google Colab notebooks.

Let’s get started!

Chapters

In this tutorial, you'll:

Build your user interface

Build a web user interface that collects iris measurements and responds to user input.

Connect your app to Google Colab

Use Anvil’s Uplink to connect your app to a machine learning model running in a Google Colab notebook.

Deploy your model

Deploy your machine learning model so it stays available beyond a temporary Colab session.

Click the following link to clone the source code and explore it yourself.

If you prefer a more theoretical approach to learning, you can dive straight into the documentation.