Maaz1/Banglore_RealEstate_forecast-using-CICD-piplines
0
๐ Real Estate Price Prediction API
๐ Project Motto
This project aims to provide an accurate and interactive Real Estate Price Prediction tool. Users can input details such as property location, square footage, number of bedrooms, and bathrooms to get an instant price prediction based on a trained machine learning model.
This API bridges the gap between data science and user-friendly deployment, allowing seamless integration of advanced predictions into real-world applications.
๐ก How It Works
- Data Processing & Model Training
- A dataset of real estate transactions was cleaned and processed.
- Key features such as
location,total_sqft,bath, andbhkwere selected. - A Linear Regression model was trained and stored as a
.pklfile for deployment.
- Prediction Mechanism
- The trained model is loaded and predicts property prices based on user inputs.
- Location data is one-hot encoded to handle categorical features.
- Interactive Frontend
- A Flask-powered web app provides an intuitive interface for predictions.
- Users input details via forms, and results are displayed instantly.
- API Integration
- A
/predictendpoint allows developers to integrate the model with other applications. ---
๐ฅ Watch the Demo(click image below๐)

๐ท Screenshots
Home Page
Prediction Results
๐ Project Structure
โโโ .github/
โ โโโ workflows/
โ โโโ python-app.yml # CI/CD workflow configuration
โโโ data/ # Dataset directory
โ โโโ bengaluru_house_prices.csv # Dataset file for the project
โโโ models/ # Saved models and feature names
โ โโโ feature_names.pkl # Pickled feature names
โ โโโ lr_regg.pkl # Trained regression model
โโโ src/ # Source code for the project
โ โโโ EDA.py # Exploratory Data Analysis script
โ โโโ model.py # Model training and evaluation script
โ โโโ preprocessing.py # Data preprocessing logic
โโโ templates/ # HTML templates for the Flask web app
โ โโโ index.html # User input form for predictions
โ โโโ results.html # Displays prediction results
โโโ tests/ # Unit testing for the project
โ โโโ __init__.py # Marks the directory as a package
โ โโโ test_model.py # Tests for the model
โ โโโ test2direct.py # Additional test script
โโโ .gitignore # Specifies ignored files for Git
โโโ app.py # Flask application entry point
โโโ main.py # Main execution script
โโโ requirements.txt # List of dependencies for the project
โโโ setup.py # Setup script for packaging the project
โโโ README.md # Project overview and documentation
๐ Features
- Accurate Price Predictions using a trained regression model.
- Interactive Web Interface for user-friendly predictions.
- API Integration for developers to use the model programmatically.
- Scalable and Extendable to new locations or additional features.
๐ ๏ธ Installation and Setup
Prerequisites
- Python 3.8+
- Flask
- Pickle
Installation Steps
- Clone the repository:
git clone https://github.com/Maazuddin1/Banglore_RealEstate_forecast-using-CICD-piplines.git
cd Banglore_RealEstate_forecast-using-CICD-piplines
- Create a virtual environment:
python -m venv env
source env/bin/activate # Linux/Mac
env\Scripts\activate # Windows- Install dependencies:
pip install -r requirements.txt- Start the Flask application:
python app.py- Open your browser and navigate to
http://127.0.0.1:5000/.
๐ API Usage
Endpoint: /predict
Method: POST Input (JSON):
{
"location": "Whitefield",
"sqft": 1200,
"bath": 2,
"bhk": 3
}Output:
{
"predicted_price": 94.23 Lakhs
}๐ Model Details
The trained model uses Linear Regression with key features like:
- total_sqft: Total square footage of the property.
- bath: Number of bathrooms.
- bhk: Number of bedrooms.
- Location: One-hot encoded for categorical support.
๐ Future Enhancements
- Add support for more advanced machine learning models like Random Forest or XGBoost.
- Improve UI design with frameworks like Bootstrap.
- Expand location datasets for better predictions.
- Add real-time price scraping for dynamic updates.
๐ผ๏ธ Visual Workflow
graph TD
A[User Input] --> B[Flask App]
B --> C[Process Input Features]
C --> D[Trained ML Model]
D --> E[Predict Price]
E --> F[Display Results]๐ Contributions
Contributions are welcome! Feel free to fork this repository, open issues, or submit pull requests.
๐ License
- ---
