# rizwanashafi/house_price architecture

> Architecture diagram of the GitHub repository rizwanashafi/house_price, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-28). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/rizwanashafi/house_price
- Repository: https://github.com/rizwanashafi/house_price

## Overview

This is a small Flask house-price prediction app. A user submits form values; the Flask route converts them to a NumPy array, calls the loaded linear-regression model, and renders the predicted price. Separately, model.py trains that model from house-price data and serializes it for the app to load. The tree omits the referenced data file, serialized model, and template contents, so their exact paths and internal details cannot be verified.

Main entry points: [`app.py`](https://github.com/rizwanashafi/house_price/blob/master/app.py) (Flask routes), [`model.py`](https://github.com/rizwanashafi/house_price/blob/master/model.py) (Regression model), [`templates`](https://github.com/rizwanashafi/house_price/tree/master/templates) (Prediction page), [`data`](https://github.com/rizwanashafi/house_price/tree/master/data) (House price data)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web prediction"]
  node_app["Flask routes<br/>[app.py]"]
  node_form["Prediction page"]
end

subgraph group_training["Model training"]
  node_model["Regression model<br/>[model.py]"]
  node_data["House price data"]
  node_artifact["Serialized model"]
end

node_user(("User"))

node_user -->|"submits values"| node_app
node_app -->|"renders page"| node_form
node_form -->|"displays price"| node_user
node_app -->|"loads model"| node_artifact
node_app -->|"predicts price"| node_model
node_model -->|"reads training data"| node_data
node_model -->|"serializes model"| node_artifact

click node_app "https://github.com/rizwanashafi/house_price/blob/master/app.py"
click node_form "https://github.com/rizwanashafi/house_price/tree/master/templates"
click node_model "https://github.com/rizwanashafi/house_price/blob/master/model.py"
click node_data "https://github.com/rizwanashafi/house_price/tree/master/data"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_app,node_form,node_user toneBlue
class node_model,node_data,node_artifact toneAmber
```

## Components

### Web prediction

- [Flask routes](https://github.com/rizwanashafi/house_price/blob/master/app.py): `app.py`
- [Prediction page](https://github.com/rizwanashafi/house_price/tree/master/templates): `templates`

### Model training

- [Regression model](https://github.com/rizwanashafi/house_price/blob/master/model.py): `model.py`
- [House price data](https://github.com/rizwanashafi/house_price/tree/master/data): `data`
- **Serialized model**

### Other components

- **User**

## Connections

- User → Flask routes: submits values
- Flask routes → Prediction page: renders page
- Prediction page → User: displays price
- Flask routes → Serialized model: loads model
- Flask routes → Regression model: predicts price
- Regression model → House price data: reads training data
- Regression model → Serialized model: serializes model
