Deploying ML Pricing Model on Flask Web App to AWS
- Jiehwan Yang
- Oct 4, 2021
- 1 min read
Updated: Jan 25, 2022
Motivation
It's becoming more important to be equipped with Cloud technologies and be able to put machine learning models into production.
In the past, I was charged unexpected fees by AWS because I didn't configure it correctly at the time. A couple of my friends (one working for a company and the other at his own startup) had a similar issue and were charged a fair amount of AWS costs. I do not want to make a similar mistake at my future job (fingers crossed).
In this project, I wanted to deploy a web application that has a predictive model running on top of it by using AWS EC2 service (using the free tier this time!).
In other words, the main goal of this project was to:
Experience end-to-end data science project only in Python by deploying an ML serving web application to AWS EC2 instanceHere are the steps I have taken:
EDA, data cleansing, feature engineering, dimensionality reduction
Build a regression model and perform GridSearch for hyperparameter tuning and K-fold cross-validation
Build back-end by writing a python Flask server that uses the pickled model to serve http requests
Build a website front-end (html, css, javascript) that allows users to enter house information including home sqr ft area, # bed, # bath, and location.
Deploy the Flask web application to an AWS EC2 instance using Nginx.
Architecture

File Source
https://github.com/jiehwan94/AWS_Deployment_House_Price_Prediction_Web_App
![[Seoul Bike Sharing #3] - Analysis of Trip Patterns in Mapo County](https://static.wixstatic.com/media/bf2529_89332843883f496286b589df817560dd~mv2.png/v1/fill/w_980,h_545,al_c,q_90,usm_0.66_1.00_0.01,enc_avif,quality_auto/bf2529_89332843883f496286b589df817560dd~mv2.png)
![[Seoul Bike Sharing #2] - Clustering Counties by Inbound-Outbound Trip Patterns](https://static.wixstatic.com/media/bf2529_0871869a3f8943b8b15ce0ec6697e12e~mv2.png/v1/fill/w_892,h_709,al_c,q_90,enc_avif,quality_auto/bf2529_0871869a3f8943b8b15ce0ec6697e12e~mv2.png)
![[Seoul Bike Sharing #1] - Bike Stations](https://static.wixstatic.com/media/bf2529_3740d5fb6834425694945390c9be1f9c~mv2.png/v1/fill/w_980,h_826,al_c,q_90,usm_0.66_1.00_0.01,enc_avif,quality_auto/bf2529_3740d5fb6834425694945390c9be1f9c~mv2.png)
Comments