A Streamlit web application that predicts residential property prices in Mumbai using a trained Decision Tree Regressor model (97.9% accuracy).
Deploy this app instantly on Streamlit Community Cloud:
- Fork / push this repo to GitHub
- Go to share.streamlit.io
- Connect your repo → set Main file path to
app.py - Click Deploy
PricePrediction/
├── app.py # Streamlit frontend
├── requirements.txt # Python dependencies
├── Mumbai-price-pridection.pickle # Trained ML model
├── house_price_mumbai.csv # Raw dataset
├── Price-Pridection.ipynb # Model training notebook
└── .github/
└── workflows/
└── ci.yml # GitHub Actions CI pipeline
# 1. Clone the repository
git clone https://github.com/manav-darji-aiml/PricePrediction.git
cd PricePrediction
# 2. Install dependencies
pip install -r requirements.txt
# 3. Launch the app
streamlit run app.pyThe app will open at http://localhost:8501.
| Property | Value |
|---|---|
| Algorithm | Decision Tree Regressor |
| Accuracy (test set) | 97.9% |
| Cross-val accuracy | ~88% (ShuffleSplit, 8 folds) |
| Training samples | 3,356 |
| Features | Total sqft, Price/sqft, BHK, Location (one-hot) |
| Target | Price in Crore (₹) |
| Feature | Type | Description |
|---|---|---|
| Location | Categorical | Mumbai suburb (20+ areas) |
| BHK | Integer 1–5 | Number of bedrooms |
| Total Area | Integer (sq ft) | Carpet / built-up area |
| Price per sq ft | Integer (₹) | Local market rate |
The .github/workflows/ci.yml workflow runs on every push/PR to main:
- Install dependencies from
requirements.txt - Verify all imports resolve correctly
- Check the model file is present
- Smoke-test the prediction logic end-to-end
- Convert price strings (
Cr/L) → float in Crore - Remove East/West suffixes from location names
- Drop locations with fewer than 25 listings
- Filter BHK types to standard 1–5 BHK Apartments
- Remove outliers using BHK price-per-sqft statistics
- One-hot encode Location (drop first to avoid multicollinearity)
- Train/test split (80/20), GridSearchCV for hyperparameter tuning