A Machine Learning + Flask Web App to predict house prices in Bangalore based on location, square footage, number of bedrooms (BHK), and bathrooms.
- Dataset: Bengaluru House Price Dataset (
bengaluru_house_prices.csv) - Model: Linear Regression (trained with data preprocessing and feature engineering)
- Backend: Python Flask API (
server.py,util.py) - Frontend: HTML, CSS, JavaScript (
app.html,app.css,app.js) - Deployment Ready: Can be hosted on Heroku / Render / AWS
├── artifacts/
│ ├── banglore_home_prices_model.pickle # Trained ML model
│ ├── columns.json # Model features
│
├── data/
│ ├── bengaluru_house_prices.csv # Raw dataset
│ ├── bhp.csv # Cleaned dataset
│
├── notebooks/
│ └── banglore_home_prices_final.ipynb # Jupyter notebook for EDA & training
│
├── app.html # Frontend UI
├── app.css # Styling
├── app.js # Client-side logic
├── server.py # Flask server
├── util.py # Helper functions
├── requirements.txt # Dependencies
└── README.md # Project Documentation
- User enters:
- Area (sqft)
- BHK
- Bathrooms
- Location
- The request is sent to Flask backend (
/predict_home_price). - The trained ML model predicts the price.
- Result is displayed on the webpage in Lakhs (₹).
- Clone the repository:
git clone https://github.com/YOUR_USERNAME/bangalore-house-price-prediction.git cd bangalore-house-price-prediction - Create a virtual environment & activate it:
python -m venv venv source venv/bin/activate # Linux/Mac venv\Scripts\activate # Windows
- Install dependencies:
pip install -r requirements.txt
- Run the Flask server:
python server.py
- Open app.html in your browser → enter details → get predictions
- Preprocessing: Removed outliers, handled missing values, averaged total_sqft ranges
- Feature Engineering: One-hot encoding for 241 Bangalore locations
- Model: Linear Regression (or XGBoost with 87.41% accuracy in testing)
- Saved: As banglore_home_prices_model.pickle
- Integrate advanced ML models (e.g., Random Forest, XGBoost, CatBoost)
- Deploy live on Heroku/Render
- Expand dataset to include other Indian cities
- Enhance UI/UX with visualizations
Prins Ambaliya
GitHub: PrinsAmbaliya
LinkedIn: https://www.linkedin.com/in/prins-ambaliya-bb7546367