Learn how to build and deploy a machine learning application from scratch. An end-to-end tutorial on data scraping, modeling, and deployment.
Disclaimer: code and demo at the end of the article.
This started out as a challenge. I wanted with a friend of mine to see if it was possible to build something from scratch and push it to production. In 3 weeks. This is our story. Here for more posts like this.
In this post, we’ll go through the necessary steps to build and deploy a machine learning application. This starts from data collection to deployment and the journey, as you’ll see it, is exciting and fun.
As you see, this web app allows a user to evaluate random brands by writing reviews. While writing, the user will see the sentiment score of his input updating in real-time along with a proposed rating from 1 to 5.
The user can then change the rating in case the suggested one does not reflect his views, and submit.
You can think of this as a crowdsourcing app of brand reviews with a sentiment analysis model that suggests ratings that the user can tweak and adapt afterward.
To build this application we’ll follow these steps:
Collecting and scraping ? customer reviews data using Selenium and Scrapy
Training a deep learning sentiment classifier ? on this data using PyTorch
Building an interactive web app using Dash ?
Setting a REST API and a Postgres database ?
Dockerizing the app using Docker Compose ?
Deploying to AWS ?
All the code is available in our Github repository and organized in independent directories, so you can check it, run it and improve it.