Skip to content

Predicting house price in Bangalore based on the key features of the house like number of rooms, size in square feet etc.

License

Notifications You must be signed in to change notification settings

Namratha2301/BangaloreHousePricePredictor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Bangalore House Price Predictor

Simple website powered by a powerful model developed using SciKit-Learn Package. The website takes in basic information(parameters) like the size of the house in square feet, number of rooms and the location of the house in bangalore to predict the price of the house. Checkout the deployed application here

Python Packages Used

  • SciKit-Learn [Model Development Framework]
  • Flask [Framework for Website Backend]
  • Numpy [Model Calculations]
  • Pickle [Model Dumping and Loading]
  • Flake8 [Linting]

Setting Up on Local Machine

Manual Setup

  1. Clone the repository using git clone https://github.com/Namratha2301/BangaloreHousePricePredictor.git
  2. Navigate to the cloned repository using cd BangaloreHousePricePredictor
  3. Setup Python Virtual Environment using either python -m venv env or <path-to-pythonexe -m venv env
  4. Once env folder is created run env\Scripts\Python.exe -m pip install --upgrade pip to update pip version to latest
  5. Now cd server and install the dependencies using pip install -r requirements.txt
  6. After the dependencies have been installed run the server using python server.py

The website will be visible at http://127.0.0.1:5000.

Setup Using Docker

  1. Clone the repository using git clone https://github.com/Namratha2301/BangaloreHousePricePredictor.git
  2. Navigate to the cloned repository using cd BangaloreHousePricePredictor
  3. Run docker-compose up to launch the container and view the site at http://127.0.0.1:5000
  4. Inorder to relaunch the container in case of any edits to the programs run the comamnd docker-compose up --build

File Structure

  1. Server/ - Contains the necessary python files for powering the website and loading and using the SciKit Learn model for prediction
  2. server.py - Main file housing the main Flask object and other endpoints required by the website
  3. utils.py - Helper functions to load the pickled sklearn model and make it ready to be used for website data
  4. artifacts/ - Folder containing the pickled model
  5. tox.ini - Configuration file for Flake8, run flake8 using the command flake8 <dir>
  6. startup.sh - Custom StartUp Command for Azure App Service