# huzaifazaidi/california_housing_price architecture

> Architecture diagram of the GitHub repository huzaifazaidi/california_housing_price, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-01-30). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/huzaifazaidi/california_housing_price
- Repository: https://github.com/huzaifazaidi/california_housing_price

## Overview

##### Main Components

a. Web Interface Layer
- Flask web application (app.py)
- HTML template (templates/home.html)

b. Model Layer
- Housing price prediction model (housing_reg.pkl)
- Data scaling component (scaling.pkl)

c. Processing Layer
- Model inference pipeline
- Data preprocessing components

##### User Interface Flow
- Web Browser → Flask Server (app.py)
- Flask Server → HTML Template (home.html)

##### Prediction Flow
- Input Data → Data Scaling (scaling.pkl)
- Scaled Data → ML Model (housing_reg.pkl)
- Model → Prediction Output
- Prediction → Web Interface

##### Specific Implementation Details

Technical specifications:
- Flask web framework
- Pickle files for model serialization
- Jupyter notebook for model development (Housing price prediction.ipynb)
- Deployment configuration (Procfile, render.yaml)

**[User Interface Layer]**
- ↕
**[Processing Layer]**
- ↕
**[Model Layer]**

## Diagram (Mermaid)

```mermaid
graph TB
    subgraph "User Interface Layer"
        Browser["Web Browser"]
        WebServer["Flask Server"]:::web
        Template["HTML Template"]:::web
    end

    subgraph "Processing Layer"
        DataProcess["Data Processing"]:::processing
        Inference["Model Inference Pipeline"]:::processing
    end

    subgraph "Model Layer"
        Model["Housing Price Model"]:::model
        Scaler["Data Scaler"]:::model
    end

    subgraph "Development & Deployment"
        Notebook["Model Development"]:::dev
        Config["Deployment Config"]:::deploy
        Dependencies["Requirements"]:::deploy
    end

    %% Relationships
    Browser -->|HTTP Request| WebServer
    WebServer -->|Render| Template
    WebServer -->|Input Data| DataProcess
    DataProcess -->|Processed Data| Scaler
    Scaler -->|Scaled Data| Model
    Model -->|Prediction| Inference
    Inference -->|Results| WebServer
    
    %% Development Flow
    Notebook -.->|Exports| Model
    Notebook -.->|Exports| Scaler
    Config -.->|Configures| WebServer
    Dependencies -.->|Supports| WebServer

    %% Click Events
    click WebServer "https://github.com/huzaifaZaidi/California_housing_price/blob/main/app.py"
    click Template "https://github.com/huzaifaZaidi/California_housing_price/blob/main/templates/home.html"
    click Model "https://github.com/huzaifaZaidi/California_housing_price/blob/main/housing_reg.pkl"
    click Scaler "https://github.com/huzaifaZaidi/California_housing_price/blob/main/scaling.pkl"
    click Notebook "https://github.com/huzaifaZaidi/California_housing_price/blob/main/Housing price prediction.ipynb"
    click Config "https://github.com/huzaifaZaidi/California_housing_price/blob/main/.render.yaml"
    click Dependencies "https://github.com/huzaifaZaidi/California_housing_price/blob/main/requirements.txt"

    %% Styles
    classDef web fill:#3498db,stroke:#2980b9,color:white
    classDef processing fill:#f1c40f,stroke:#f39c12,color:black
    classDef model fill:#2ecc71,stroke:#27ae60,color:white
    classDef dev fill:#95a5a6,stroke:#7f8c8d,color:white
    classDef deploy fill:#e74c3c,stroke:#c0392b,color:white

    %% Legend
    subgraph Legend
        L1["Web Component"]:::web
        L2["Processing Component"]:::processing
        L3["Model Component"]:::model
        L4["Development"]:::dev
        L5["Deployment"]:::deploy
    end
```
