# pranathir73/indian-pre-owned-car-price-prediction architecture

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

- Interactive diagram: https://gitdiagram.com/pranathir73/indian-pre-owned-car-price-prediction
- Repository: https://github.com/pranathir73/indian-pre-owned-car-price-prediction

## Overview

This is a Streamlit app for estimating Indian pre-owned car prices. A user supplies vehicle details for an instant valuation, or uploads a CSV for batch predictions; both paths engineer features and call the saved model, then show prices with ±5% bands. The app also presents pricing trends from the training CSV. The sampled app.py shows these flows and the model/data reads; the notebook and training process were not inspected, so model creation is not mapped.

Main entry points: [`app.py`](https://github.com/pranathir73/indian-pre-owned-car-price-prediction/blob/main/app.py) (Batch CSV upload), [`best_car_price_model.joblib`](https://github.com/pranathir73/indian-pre-owned-car-price-prediction/blob/main/best_car_price_model.joblib) (Saved price model), [`feature_metadata.json`](https://github.com/pranathir73/indian-pre-owned-car-price-prediction/blob/main/feature_metadata.json) (Feature metadata), [`Cap_Training_Data_2025.csv`](https://github.com/pranathir73/indian-pre-owned-car-price-prediction/blob/main/Cap_Training_Data_2025.csv) (Training data)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interface["User interface"]
  node_vehicle_form["Vehicle form<br/>[app.py]"]
  node_batch_upload["Batch CSV upload<br/>[app.py]"]
end

subgraph group_prediction["Prediction"]
  node_model_loader["Model and metadata loader<br/>[app.py]"]
  node_saved_model["Saved price model"]
  node_feature_metadata["Feature metadata"]
  node_feature_engineering["Feature engineering<br/>[app.py]"]
  node_single_valuation["Single-car valuation<br/>[app.py]"]
  node_batch_prediction["Batch prediction<br/>[app.py]"]
  node_price_bands["Price bands and warnings<br/>[app.py]"]
  node_prediction_download["Prediction CSV download<br/>[app.py]"]
end

subgraph group_insights["Market insights"]
  node_training_loader["Training data loader<br/>[app.py]"]
  node_training_csv["Training data"]
  node_trend_charts["Pricing trend charts<br/>[app.py]"]
end

node_user(("User"))

node_user -->|"enters details"| node_vehicle_form
node_user -->|"uploads CSV"| node_batch_upload
node_model_loader -->|"loads model"| node_saved_model
node_model_loader -->|"loads metadata"| node_feature_metadata
node_vehicle_form -->|"engineers features"| node_feature_engineering
node_feature_engineering -->|"returns features"| node_single_valuation
node_single_valuation -->|"predicts price"| node_saved_model
node_single_valuation -->|"computes bands"| node_price_bands
node_batch_upload -->|"engineers features"| node_feature_engineering
node_batch_upload -->|"predicts prices"| node_saved_model
node_batch_upload -->|"builds CSV"| node_prediction_download
node_single_valuation -->|"reads options and metrics"| node_feature_metadata
node_training_loader -->|"reads data"| node_training_csv
node_training_loader -->|"supplies data"| node_trend_charts
node_user -->|"downloads results"| node_prediction_download

click node_vehicle_form "https://github.com/pranathir73/indian-pre-owned-car-price-prediction/blob/main/app.py"
click node_batch_upload "https://github.com/pranathir73/indian-pre-owned-car-price-prediction/blob/main/app.py"
click node_model_loader "https://github.com/pranathir73/indian-pre-owned-car-price-prediction/blob/main/app.py"
click node_saved_model "https://github.com/pranathir73/indian-pre-owned-car-price-prediction/blob/main/best_car_price_model.joblib"
click node_feature_metadata "https://github.com/pranathir73/indian-pre-owned-car-price-prediction/blob/main/feature_metadata.json"
click node_feature_engineering "https://github.com/pranathir73/indian-pre-owned-car-price-prediction/blob/main/app.py"
click node_single_valuation "https://github.com/pranathir73/indian-pre-owned-car-price-prediction/blob/main/app.py"
click node_batch_prediction "https://github.com/pranathir73/indian-pre-owned-car-price-prediction/blob/main/app.py"
click node_price_bands "https://github.com/pranathir73/indian-pre-owned-car-price-prediction/blob/main/app.py"
click node_prediction_download "https://github.com/pranathir73/indian-pre-owned-car-price-prediction/blob/main/app.py"
click node_training_loader "https://github.com/pranathir73/indian-pre-owned-car-price-prediction/blob/main/app.py"
click node_training_csv "https://github.com/pranathir73/indian-pre-owned-car-price-prediction/blob/main/Cap_Training_Data_2025.csv"
click node_trend_charts "https://github.com/pranathir73/indian-pre-owned-car-price-prediction/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_vehicle_form,node_batch_upload,node_user toneBlue
class node_model_loader,node_saved_model,node_feature_metadata,node_feature_engineering,node_single_valuation,node_batch_prediction,node_price_bands,node_prediction_download toneAmber
class node_training_loader,node_training_csv,node_trend_charts toneMint
```

## Components

### User interface

- [Vehicle form](https://github.com/pranathir73/indian-pre-owned-car-price-prediction/blob/main/app.py): `app.py`
- [Batch CSV upload](https://github.com/pranathir73/indian-pre-owned-car-price-prediction/blob/main/app.py): `app.py`

### Prediction

- [Model and metadata loader](https://github.com/pranathir73/indian-pre-owned-car-price-prediction/blob/main/app.py): `app.py`
- [Saved price model](https://github.com/pranathir73/indian-pre-owned-car-price-prediction/blob/main/best_car_price_model.joblib): `best_car_price_model.joblib`
- [Feature metadata](https://github.com/pranathir73/indian-pre-owned-car-price-prediction/blob/main/feature_metadata.json): `feature_metadata.json`
- [Feature engineering](https://github.com/pranathir73/indian-pre-owned-car-price-prediction/blob/main/app.py): `app.py`
- [Single-car valuation](https://github.com/pranathir73/indian-pre-owned-car-price-prediction/blob/main/app.py): `app.py`
- [Batch prediction](https://github.com/pranathir73/indian-pre-owned-car-price-prediction/blob/main/app.py): `app.py`
- [Price bands and warnings](https://github.com/pranathir73/indian-pre-owned-car-price-prediction/blob/main/app.py): `app.py`
- [Prediction CSV download](https://github.com/pranathir73/indian-pre-owned-car-price-prediction/blob/main/app.py): `app.py`

### Market insights

- [Training data loader](https://github.com/pranathir73/indian-pre-owned-car-price-prediction/blob/main/app.py): `app.py`
- [Training data](https://github.com/pranathir73/indian-pre-owned-car-price-prediction/blob/main/Cap_Training_Data_2025.csv): `Cap_Training_Data_2025.csv`
- [Pricing trend charts](https://github.com/pranathir73/indian-pre-owned-car-price-prediction/blob/main/app.py): `app.py`

### Other components

- **User**

## Connections

- User → Vehicle form: enters details (evidence: `app.py`)
- User → Batch CSV upload: uploads CSV (evidence: `app.py`)
- Model and metadata loader → Saved price model: loads model (evidence: `app.py`)
- Model and metadata loader → Feature metadata: loads metadata (evidence: `app.py`)
- Vehicle form → Feature engineering: engineers features (evidence: `app.py`)
- Feature engineering → Single-car valuation: returns features (evidence: `app.py`)
- Single-car valuation → Saved price model: predicts price (evidence: `app.py`)
- Single-car valuation → Price bands and warnings: computes bands (evidence: `app.py`)
- Batch CSV upload → Feature engineering: engineers features (evidence: `app.py`)
- Batch CSV upload → Saved price model: predicts prices (evidence: `app.py`)
- Batch CSV upload → Prediction CSV download: builds CSV (evidence: `app.py`)
- Single-car valuation → Feature metadata: reads options and metrics (evidence: `app.py`)
- Training data loader → Training data: reads data (evidence: `app.py`)
- Training data loader → Pricing trend charts: supplies data (evidence: `app.py`)
- User → Prediction CSV download: downloads results (evidence: `app.py`)
