# idharshan/ml-based-vehicle-predictive-maintenance-system-with-real-time-visualization architecture

> Architecture diagram of the GitHub repository idharshan/ml-based-vehicle-predictive-maintenance-system-with-real-time-visualization, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-27). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/idharshan/ml-based-vehicle-predictive-maintenance-system-with-real-time-visualization
- Repository: https://github.com/idharshan/ml-based-vehicle-predictive-maintenance-system-with-real-time-visualization

## Overview

This is a vehicle engine-condition prediction demo: a user enters sensor values in a Streamlit interface, requests a prediction, and sees a normal/warning result with a confidence value. The README describes a broader predictive-maintenance workflow, including preprocessing and GBM training, but those notebook details were not sampled; the app itself uses manual sliders rather than a live sensor feed. There is also a filename mismatch: app.py loads model.pkl, while the tree contains hhmodel.pkl, so their connection is unverified. Maintenance-date estimates and scheduling are documented but not implemented in the sampled app.

Main entry points: [`app.py`](https://github.com/idharshan/ml-based-vehicle-predictive-maintenance-system-with-real-time-visualization/blob/main/app.py) (Sensor input UI), [`engine_data.csv`](https://github.com/idharshan/ml-based-vehicle-predictive-maintenance-system-with-real-time-visualization/blob/main/engine_data.csv) (Engine dataset), [`data_preprocessing.ipynb`](https://github.com/idharshan/ml-based-vehicle-predictive-maintenance-system-with-real-time-visualization/blob/main/data_preprocessing.ipynb) (Data preprocessing)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interface["Prediction interface"]
  node_streamlit["Sensor input UI<br/>[app.py]"]
  node_result["Condition and confidence<br/>[app.py]"]
end

subgraph group_modeling["Model workflow"]
  node_inference["Condition inference<br/>[app.py]"]
  node_preprocess["Data preprocessing"]
  node_model_artifact["Model artifact<br/>[hhmodel.pkl]"]
end

subgraph group_data["Training data"]
  node_training_data[("Engine dataset<br/>[engine_data.csv]")]
end

node_user(("Fleet user"))

node_user -->|"enters sensor values"| node_streamlit
node_streamlit -->|"requests prediction"| node_inference
node_inference -->|"returns class and confidence"| node_result
node_training_data -->|"training data"| node_preprocess

click node_streamlit "https://github.com/idharshan/ml-based-vehicle-predictive-maintenance-system-with-real-time-visualization/blob/main/app.py"
click node_inference "https://github.com/idharshan/ml-based-vehicle-predictive-maintenance-system-with-real-time-visualization/blob/main/app.py"
click node_result "https://github.com/idharshan/ml-based-vehicle-predictive-maintenance-system-with-real-time-visualization/blob/main/app.py"
click node_preprocess "https://github.com/idharshan/ml-based-vehicle-predictive-maintenance-system-with-real-time-visualization/blob/main/data_preprocessing.ipynb"
click node_training_data "https://github.com/idharshan/ml-based-vehicle-predictive-maintenance-system-with-real-time-visualization/blob/main/engine_data.csv"
click node_model_artifact "https://github.com/idharshan/ml-based-vehicle-predictive-maintenance-system-with-real-time-visualization/blob/main/hhmodel.pkl"

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_streamlit,node_result,node_user toneBlue
class node_inference,node_preprocess,node_model_artifact toneAmber
class node_training_data toneMint
```

## Components

### Prediction interface

- [Sensor input UI](https://github.com/idharshan/ml-based-vehicle-predictive-maintenance-system-with-real-time-visualization/blob/main/app.py): `app.py`
- [Condition and confidence](https://github.com/idharshan/ml-based-vehicle-predictive-maintenance-system-with-real-time-visualization/blob/main/app.py): `app.py`

### Model workflow

- [Condition inference](https://github.com/idharshan/ml-based-vehicle-predictive-maintenance-system-with-real-time-visualization/blob/main/app.py): `app.py`
- [Data preprocessing](https://github.com/idharshan/ml-based-vehicle-predictive-maintenance-system-with-real-time-visualization/blob/main/data_preprocessing.ipynb): `data_preprocessing.ipynb`
- [Model artifact](https://github.com/idharshan/ml-based-vehicle-predictive-maintenance-system-with-real-time-visualization/blob/main/hhmodel.pkl): `hhmodel.pkl`

### Training data

- [Engine dataset](https://github.com/idharshan/ml-based-vehicle-predictive-maintenance-system-with-real-time-visualization/blob/main/engine_data.csv): `engine_data.csv`

### Other components

- **Fleet user**

## Connections

- Fleet user → Sensor input UI: enters sensor values
- Sensor input UI → Condition inference: requests prediction
- Condition inference → Condition and confidence: returns class and confidence
- Engine dataset → Data preprocessing: training data
