Skip to content

Getting Started

Prerequisites

  • Python 3.8 or higher
  • pip

Installation

Clone the source repository:

git clone https://github.com/Gozie02/House-Price-Prediction.git
cd House-Price-Prediction

Install dependencies:

pip install -r requirements.txt

The requirements.txt includes:

Package Purpose
streamlit Web interface
scikit-learn Model training and inference
numpy Numerical operations
pickle Model serialisation (stdlib)

Running the App

The trained models are already serialised as .pkl files in the repository root. You do not need to re-train to run the app.

streamlit run app.py

Streamlit will start a local server and open the app in your browser at http://localhost:8501.

Re-training Models

If you want to re-train from scratch, open the notebook:

jupyter notebook house-price-prediction.ipynb

Run all cells in order. The final cells will serialise the trained models back to .pkl files, overwriting the existing ones.

Warning

Re-training will overwrite LRModel.pkl, RidgeModel.pkl, and RandomForestModel.pkl. Back up the existing files first if you want to compare outputs.

Project Structure

House-Price-Prediction/
├── house-price-prediction.ipynb  # Training notebook
├── app.py                        # Streamlit application
├── LRModel.pkl                   # Serialised Linear Regression model
├── RidgeModel.pkl                # Serialised Ridge Regression model
├── RandomForestModel.pkl         # Serialised Random Forest model (used in app)
└── requirements.txt