CoolFace
Apppublic

Maaz1/Banglore_RealEstate_forecast-using-CICD-piplines

sourceHugging Faceapache-2.0updated 1y agoView on Hugging Face
0likes
App README

๐Ÿ  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

  1. 1.Data Processing & Model Training
  2. 2.A dataset of real estate transactions was cleaned and processed.
  3. 3.Key features such as location, total_sqft, bath, and bhk were selected.
  4. 4.A Linear Regression model was trained and stored as a .pkl file for deployment.
  1. 1.Prediction Mechanism
  2. 2.The trained model is loaded and predicts property prices based on user inputs.
  3. 3.Location data is one-hot encoded to handle categorical features.
  1. 1.Interactive Frontend
  2. 2.A Flask-powered web app provides an intuitive interface for predictions.
  3. 3.Users input details via forms, and results are displayed instantly.
  1. 1.API Integration
  2. 2.A /predict endpoint allows developers to integrate the model with other applications. ---

๐ŸŽฅ Watch the Demo(click image below๐Ÿ‘‡)

![Watch on YouTube](https://www.youtube.com/watch?v=NcmXkE907io)


๐Ÿ“ท Screenshots

Home Page

[image]

Prediction Results

[image]


๐Ÿ“‚ 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

  1. 1.Clone the repository:
bash
 git clone https://github.com/Maazuddin1/Banglore_RealEstate_forecast-using-CICD-piplines.git  
 cd Banglore_RealEstate_forecast-using-CICD-piplines
 
  1. 1.Create a virtual environment:
bash
   python -m venv env
   source env/bin/activate  # Linux/Mac
   env\Scripts\activate     # Windows
  1. 1.Install dependencies:
bash
   pip install -r requirements.txt
  1. 1.Start the Flask application:
bash
   python app.py
  1. 1.Open your browser and navigate to http://127.0.0.1:5000/.

๐ŸŒ API Usage

Endpoint: /predict

Method: POST Input (JSON):

json
{
  "location": "Whitefield",
  "sqft": 1200,
  "bath": 2,
  "bhk": 3
}

Output:

json
{
  "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

mermaid
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

- ---