# avinandanroyy/car-price-prediction-ml architecture

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

- Interactive diagram: https://gitdiagram.com/avinandanroyy/car-price-prediction-ml
- Repository: https://github.com/avinandanroyy/car-price-prediction-ml

## Overview

This is a Streamlit used-car valuation app. A user enters vehicle details, the app encodes them for a bundled regression model, then presents an estimated price, depreciation, price range, and supporting analysis. The sampled source supports this interactive workflow and model loading; the CSV and notebook are present in the tree, but their role is not established by the available excerpts.

Main entry points: [`app.py`](https://github.com/avinandanroyy/car-price-prediction-ml/blob/main/app.py) (Streamlit app), [`car_prediction_model.pkl`](https://github.com/avinandanroyy/car-price-prediction-ml/blob/main/car_prediction_model.pkl) (Prediction model)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interface["User Interface"]
  node_app["Streamlit app<br/>[app.py]"]
  node_vehicle_inputs["Vehicle inputs<br/>[app.py]"]
end

subgraph group_valuation["Valuation"]
  node_model_loader["Model loader<br/>[app.py]"]
  node_model_artifact["Prediction model"]
  node_feature_prep["Feature encoding<br/>[app.py]"]
  node_inference["Price inference<br/>[app.py]"]
end

subgraph group_presentation["Results"]
  node_price_analysis["Depreciation analysis<br/>[app.py]"]
  node_result_view["Valuation results<br/>[app.py]"]
  node_price_gauge["Price gauge<br/>[app.py]"]
end

node_user(("Car owner"))

node_user -->|"opens"| node_app
node_app -->|"collects"| node_vehicle_inputs
node_app -->|"loads model"| node_model_loader
node_model_loader -->|"reads"| node_model_artifact
node_app -->|"encodes inputs"| node_feature_prep
node_app -->|"runs prediction"| node_inference
node_inference -->|"predicts with"| node_model_artifact
node_app -->|"calculates"| node_price_analysis
node_app -->|"renders"| node_result_view
node_app -->|"renders chart"| node_price_gauge
node_price_analysis -->|"supplies metrics"| node_result_view

click node_app "https://github.com/avinandanroyy/car-price-prediction-ml/blob/main/app.py"
click node_vehicle_inputs "https://github.com/avinandanroyy/car-price-prediction-ml/blob/main/app.py"
click node_model_loader "https://github.com/avinandanroyy/car-price-prediction-ml/blob/main/app.py"
click node_model_artifact "https://github.com/avinandanroyy/car-price-prediction-ml/blob/main/car_prediction_model.pkl"
click node_feature_prep "https://github.com/avinandanroyy/car-price-prediction-ml/blob/main/app.py"
click node_inference "https://github.com/avinandanroyy/car-price-prediction-ml/blob/main/app.py"
click node_price_analysis "https://github.com/avinandanroyy/car-price-prediction-ml/blob/main/app.py"
click node_result_view "https://github.com/avinandanroyy/car-price-prediction-ml/blob/main/app.py"
click node_price_gauge "https://github.com/avinandanroyy/car-price-prediction-ml/blob/main/app.py"

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_vehicle_inputs toneBlue
class node_model_loader,node_model_artifact,node_feature_prep,node_inference toneAmber
class node_price_analysis,node_result_view,node_price_gauge toneMint
class node_user toneIndigo
```

## Components

### User Interface

- [Streamlit app](https://github.com/avinandanroyy/car-price-prediction-ml/blob/main/app.py): `app.py`
- [Vehicle inputs](https://github.com/avinandanroyy/car-price-prediction-ml/blob/main/app.py): `app.py`

### Valuation

- [Model loader](https://github.com/avinandanroyy/car-price-prediction-ml/blob/main/app.py): `app.py`
- [Prediction model](https://github.com/avinandanroyy/car-price-prediction-ml/blob/main/car_prediction_model.pkl): `car_prediction_model.pkl`
- [Feature encoding](https://github.com/avinandanroyy/car-price-prediction-ml/blob/main/app.py): `app.py`
- [Price inference](https://github.com/avinandanroyy/car-price-prediction-ml/blob/main/app.py): `app.py`

### Results

- [Depreciation analysis](https://github.com/avinandanroyy/car-price-prediction-ml/blob/main/app.py): `app.py`
- [Valuation results](https://github.com/avinandanroyy/car-price-prediction-ml/blob/main/app.py): `app.py`
- [Price gauge](https://github.com/avinandanroyy/car-price-prediction-ml/blob/main/app.py): `app.py`

### Other components

- **Car owner**

## Connections

- Car owner → Streamlit app: opens
- Streamlit app → Vehicle inputs: collects
- Streamlit app → Model loader: loads model
- Model loader → Prediction model: reads
- Streamlit app → Feature encoding: encodes inputs
- Streamlit app → Price inference: runs prediction
- Price inference → Prediction model: predicts with
- Streamlit app → Depreciation analysis: calculates
- Streamlit app → Valuation results: renders
- Streamlit app → Price gauge: renders chart
- Depreciation analysis → Valuation results: supplies metrics
