Most data scientists spend a lot of time analyzing data and building models in Jupyter Notebooks but rarely take them to the next level where those machine-learning models are exposed through a custom, friendly web interface or via APIs. Four options coexist to productionalize models:
This article is about the fourth option. We will show you how to use CodeNOW to quickly get a proof of concept in the hands of your users and get feedback to improve your model. You can leverage your Python and data skills and forget about the complexity associated with JavaScript, front-end frameworks, and cloud deployments:
CodeNOW will take care of disaster recovery, scaling, monitoring and logging, and many more mundane albeit necessary cloud operation tasks. And pick the cloud provider of your choice. You do not need to use the Google Cloud Platform just because you use Google Colab notebooks! CodeNOW is cloud agnostic and factors vendor lock-in out of the equation.
Without further ado, let's implement and deploy what is often considered to be the Hello World application of machine learning. Given a set of inputs, our model will predict which type of flower the inputs most likely relate to. The model is based on the Iris data set. The Iris Dataset contains four features (length and width of sepals and petals) of 50 samples of three species of Iris (Iris setosa, Iris versicolor, and Iris virginica).
Iris setosaIris versicolorIris virginica
This is the user interface we are aiming at:
We follow a five-step process. In what follows, we present a high-level overview. For a detailed overview, refer to our step-by-step video.
Streamlit is a free and open-source ML tooling framework to create interactive ML tools. No JavaScript, no React. plain Python, and a ton of premade widgets.
Did you manage to run the example? Let us know what you think!
If you want more data science examples using Python, the Data Professor YouTube channel by Prof. Nantasenamat contains many examples to learn from. You can for instance review this video from which we took the code for our Iris flower machine learning application.
How do you use Python? What examples would you like to see? Tell us!