# aditya20030420/emipredict-ai architecture

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

- Interactive diagram: https://gitdiagram.com/aditya20030420/emipredict-ai
- Repository: https://github.com/aditya20030420/emipredict-ai

## Overview

EMIPredict AI is a dual-model financial risk assessment platform. Applicants use the Streamlit app to enter financial details and receive eligibility and safe-EMI predictions; the eligibility page also compares the requested instalment with safe capacity. Separate app branches support dataset exploration, model-performance viewing, and applicant-record CRUD. The training side covers data cleaning and splitting, EDA, feature engineering, classification and regression training, tuning, evaluation, and model registry. Edges are limited to README statements and source-index references; several unsampled page and training implementations are represented only at their documented or indexed scope.

Main entry points: [`app/utils.py`](https://github.com/aditya20030420/emipredict-ai/blob/main/app/utils.py) (Forms and inference helpers), [`app/theme.py`](https://github.com/aditya20030420/emipredict-ai/blob/main/app/theme.py) (Shared UI theme), [`src/data_loader.py`](https://github.com/aditya20030420/emipredict-ai/blob/main/src/data_loader.py) (Data cleaning and quality), [`src/train_classification.py`](https://github.com/aditya20030420/emipredict-ai/blob/main/src/train_classification.py) (Classification training)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Applicant app"]
  node_home["App home<br/>[Home.py]"]
  node_eligibility["Eligibility prediction"]
  node_maxemi["Maximum EMI prediction"]
  node_app_helpers["Forms and inference helpers<br/>[utils.py]"]
  node_theme["Shared UI theme<br/>[theme.py]"]
  node_models_artifacts[("Champion model files")]
end

subgraph group_data["Data preparation"]
  node_config["Paths and feature schema<br/>[config.py]"]
  node_loader["Data cleaning and quality<br/>[data_loader.py]"]
  node_splitting["Train-validation-test split<br/>[split_data.py]"]
  node_eda["Exploratory analysis<br/>[eda.py]"]
end

subgraph group_models["Model development"]
  node_features["Feature engineering pipeline<br/>[features.py]"]
  node_clf_training["Classification training"]
  node_reg_training["Regression training"]
  node_tuning["Classification tuning"]
  node_evaluation["Metric evaluation<br/>[evaluate.py]"]
  node_registry["Model registry<br/>[registry.py]"]
end

subgraph group_insights["Exploration and records"]
  node_data_explorer["Data explorer<br/>[3_Data_Explorer.py]"]
  node_dashboard["Model dashboard"]
  node_admin["Applicant CRUD<br/>[5_Admin_CRUD.py]"]
  node_sqlite[("SQLite applicant store<br/>[utils.py]")]
  node_sample["Explorer sample data<br/>[sample.csv]"]
end

node_applicant(("Applicant"))
node_mlflow{{"MLflow tracking"}}

node_applicant -->|"opens app"| node_home
node_home -->|"loads models"| node_app_helpers
node_home -->|"renders with"| node_theme
node_applicant -->|"submits profile"| node_eligibility
node_applicant -->|"submits profile"| node_maxemi
node_eligibility -->|"requests predictions"| node_app_helpers
node_eligibility -->|"renders results"| node_theme
node_maxemi -->|"uses helpers"| node_app_helpers
node_maxemi -->|"renders with"| node_theme
node_app_helpers -.->|"loads models"| node_models_artifacts
node_app_helpers -->|"uses transforms"| node_features
node_app_helpers -->|"reads and writes"| node_sqlite
node_applicant -->|"explores records"| node_data_explorer
node_data_explorer -->|"loads sample"| node_sample
node_data_explorer -->|"cleans data"| node_loader
node_data_explorer -->|"uses schema"| node_config
node_data_explorer -->|"renders with"| node_theme
node_applicant -->|"views metrics"| node_dashboard
node_dashboard -->|"renders with"| node_theme
node_applicant -->|"manages records"| node_admin
node_admin -->|"uses CRUD helpers"| node_app_helpers
node_admin -->|"renders with"| node_theme
node_applicant -.->|"runs data pipeline"| node_splitting
node_splitting -->|"loads cleaned data"| node_loader
node_splitting -->|"uses paths"| node_config
node_eda -->|"loads fallback data"| node_loader
node_eda -->|"uses dataset settings"| node_config
node_clf_training -->|"loads split data"| node_loader
node_clf_training -->|"builds preprocessing"| node_features
node_clf_training -->|"computes metrics"| node_evaluation
node_clf_training -->|"uses targets"| node_config
node_reg_training -->|"loads split data"| node_loader
node_reg_training -->|"builds preprocessing"| node_features
node_reg_training -->|"computes metrics"| node_evaluation
node_tuning -->|"loads split data"| node_loader
node_tuning -->|"builds preprocessing"| node_features
node_tuning -->|"computes metrics"| node_evaluation
node_registry -->|"uses settings"| node_config
node_clf_training -->|"logs experiments"| node_mlflow
node_registry -->|"tracks versions"| node_mlflow

click node_home "https://github.com/aditya20030420/emipredict-ai/blob/main/app/Home.py"
click node_eligibility "https://github.com/aditya20030420/emipredict-ai/blob/main/app/pages/1_Predict_Eligibility.py"
click node_maxemi "https://github.com/aditya20030420/emipredict-ai/blob/main/app/pages/2_Predict_Max_EMI.py"
click node_app_helpers "https://github.com/aditya20030420/emipredict-ai/blob/main/app/utils.py"
click node_theme "https://github.com/aditya20030420/emipredict-ai/blob/main/app/theme.py"
click node_models_artifacts "https://github.com/aditya20030420/emipredict-ai/tree/main/models"
click node_data_explorer "https://github.com/aditya20030420/emipredict-ai/blob/main/app/pages/3_Data_Explorer.py"
click node_dashboard "https://github.com/aditya20030420/emipredict-ai/blob/main/app/pages/4_Model_Dashboard.py"
click node_admin "https://github.com/aditya20030420/emipredict-ai/blob/main/app/pages/5_Admin_CRUD.py"
click node_sqlite "https://github.com/aditya20030420/emipredict-ai/blob/main/app/utils.py"
click node_sample "https://github.com/aditya20030420/emipredict-ai/blob/main/data/sample.csv"
click node_config "https://github.com/aditya20030420/emipredict-ai/blob/main/src/config.py"
click node_loader "https://github.com/aditya20030420/emipredict-ai/blob/main/src/data_loader.py"
click node_splitting "https://github.com/aditya20030420/emipredict-ai/blob/main/src/split_data.py"
click node_eda "https://github.com/aditya20030420/emipredict-ai/blob/main/src/eda.py"
click node_features "https://github.com/aditya20030420/emipredict-ai/blob/main/src/features.py"
click node_clf_training "https://github.com/aditya20030420/emipredict-ai/blob/main/src/train_classification.py"
click node_reg_training "https://github.com/aditya20030420/emipredict-ai/blob/main/src/train_regression.py"
click node_tuning "https://github.com/aditya20030420/emipredict-ai/blob/main/src/tune_classification.py"
click node_evaluation "https://github.com/aditya20030420/emipredict-ai/blob/main/src/evaluate.py"
click node_registry "https://github.com/aditya20030420/emipredict-ai/blob/main/src/registry.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_home,node_eligibility,node_maxemi,node_app_helpers,node_theme,node_models_artifacts toneBlue
class node_config,node_loader,node_splitting,node_eda toneAmber
class node_features,node_clf_training,node_reg_training,node_tuning,node_evaluation,node_registry toneMint
class node_data_explorer,node_dashboard,node_admin,node_sqlite,node_sample toneRose
class node_applicant,node_mlflow toneIndigo
```

## Components

### Applicant app

- [App home](https://github.com/aditya20030420/emipredict-ai/blob/main/app/Home.py): `app/Home.py`
- [Eligibility prediction](https://github.com/aditya20030420/emipredict-ai/blob/main/app/pages/1_Predict_Eligibility.py): `app/pages/1_Predict_Eligibility.py`
- [Maximum EMI prediction](https://github.com/aditya20030420/emipredict-ai/blob/main/app/pages/2_Predict_Max_EMI.py): `app/pages/2_Predict_Max_EMI.py`
- [Forms and inference helpers](https://github.com/aditya20030420/emipredict-ai/blob/main/app/utils.py): `app/utils.py`
- [Shared UI theme](https://github.com/aditya20030420/emipredict-ai/blob/main/app/theme.py): `app/theme.py`
- [Champion model files](https://github.com/aditya20030420/emipredict-ai/tree/main/models): `models`

### Data preparation

- [Paths and feature schema](https://github.com/aditya20030420/emipredict-ai/blob/main/src/config.py): `src/config.py`
- [Data cleaning and quality](https://github.com/aditya20030420/emipredict-ai/blob/main/src/data_loader.py): `src/data_loader.py`
- [Train-validation-test split](https://github.com/aditya20030420/emipredict-ai/blob/main/src/split_data.py): `src/split_data.py`
- [Exploratory analysis](https://github.com/aditya20030420/emipredict-ai/blob/main/src/eda.py): `src/eda.py`

### Model development

- [Feature engineering pipeline](https://github.com/aditya20030420/emipredict-ai/blob/main/src/features.py): `src/features.py`
- [Classification training](https://github.com/aditya20030420/emipredict-ai/blob/main/src/train_classification.py): `src/train_classification.py`
- [Regression training](https://github.com/aditya20030420/emipredict-ai/blob/main/src/train_regression.py): `src/train_regression.py`
- [Classification tuning](https://github.com/aditya20030420/emipredict-ai/blob/main/src/tune_classification.py): `src/tune_classification.py`
- [Metric evaluation](https://github.com/aditya20030420/emipredict-ai/blob/main/src/evaluate.py): `src/evaluate.py`
- [Model registry](https://github.com/aditya20030420/emipredict-ai/blob/main/src/registry.py): `src/registry.py`

### Exploration and records

- [Data explorer](https://github.com/aditya20030420/emipredict-ai/blob/main/app/pages/3_Data_Explorer.py): `app/pages/3_Data_Explorer.py`
- [Model dashboard](https://github.com/aditya20030420/emipredict-ai/blob/main/app/pages/4_Model_Dashboard.py): `app/pages/4_Model_Dashboard.py`
- [Applicant CRUD](https://github.com/aditya20030420/emipredict-ai/blob/main/app/pages/5_Admin_CRUD.py): `app/pages/5_Admin_CRUD.py`
- [SQLite applicant store](https://github.com/aditya20030420/emipredict-ai/blob/main/app/utils.py): `app/utils.py`
- [Explorer sample data](https://github.com/aditya20030420/emipredict-ai/blob/main/data/sample.csv): `data/sample.csv`

### Other components

- **Applicant**
- **MLflow tracking**

## Connections

- Applicant → App home: opens app (evidence: `README.md`)
- App home → Forms and inference helpers: loads models (evidence: `app/Home.py`)
- App home → Shared UI theme: renders with (evidence: `app/Home.py`)
- Applicant → Eligibility prediction: submits profile (evidence: `README.md`)
- Applicant → Maximum EMI prediction: submits profile (evidence: `README.md`)
- Eligibility prediction → Forms and inference helpers: requests predictions (evidence: `app/pages/1_Predict_Eligibility.py`)
- Eligibility prediction → Shared UI theme: renders results (evidence: `app/pages/1_Predict_Eligibility.py`)
- Maximum EMI prediction → Forms and inference helpers: uses helpers (evidence: `app/pages/2_Predict_Max_EMI.py`)
- Maximum EMI prediction → Shared UI theme: renders with (evidence: `app/pages/2_Predict_Max_EMI.py`)
- Forms and inference helpers → Champion model files: loads models (evidence: `README.md`)
- Forms and inference helpers → Feature engineering pipeline: uses transforms (evidence: `app/utils.py`)
- Forms and inference helpers → SQLite applicant store: reads and writes (evidence: `app/utils.py`)
- Applicant → Data explorer: explores records (evidence: `README.md`)
- Data explorer → Explorer sample data: loads sample (evidence: `README.md`)
- Data explorer → Data cleaning and quality: cleans data (evidence: `app/pages/3_Data_Explorer.py`)
- Data explorer → Paths and feature schema: uses schema (evidence: `app/pages/3_Data_Explorer.py`)
- Data explorer → Shared UI theme: renders with (evidence: `app/pages/3_Data_Explorer.py`)
- Applicant → Model dashboard: views metrics (evidence: `README.md`)
- Model dashboard → Shared UI theme: renders with (evidence: `app/pages/4_Model_Dashboard.py`)
- Applicant → Applicant CRUD: manages records (evidence: `README.md`)
- Applicant CRUD → Forms and inference helpers: uses CRUD helpers (evidence: `app/pages/5_Admin_CRUD.py`)
- Applicant CRUD → Shared UI theme: renders with (evidence: `app/pages/5_Admin_CRUD.py`)
- Applicant → Train-validation-test split: runs data pipeline (evidence: `README.md`)
- Train-validation-test split → Data cleaning and quality: loads cleaned data (evidence: `src/split_data.py`)
- Train-validation-test split → Paths and feature schema: uses paths (evidence: `src/split_data.py`)
- Exploratory analysis → Data cleaning and quality: loads fallback data (evidence: `src/eda.py`)
- Exploratory analysis → Paths and feature schema: uses dataset settings (evidence: `src/eda.py`)
- Classification training → Data cleaning and quality: loads split data (evidence: `src/train_classification.py`)
- Classification training → Feature engineering pipeline: builds preprocessing (evidence: `src/train_classification.py`)
- Classification training → Metric evaluation: computes metrics (evidence: `src/train_classification.py`)
- Classification training → Paths and feature schema: uses targets (evidence: `src/train_classification.py`)
- Regression training → Data cleaning and quality: loads split data (evidence: `src/train_regression.py`)
- Regression training → Feature engineering pipeline: builds preprocessing (evidence: `src/train_regression.py`)
- Regression training → Metric evaluation: computes metrics (evidence: `src/train_regression.py`)
- Classification tuning → Data cleaning and quality: loads split data (evidence: `src/tune_classification.py`)
- Classification tuning → Feature engineering pipeline: builds preprocessing (evidence: `src/tune_classification.py`)
- Classification tuning → Metric evaluation: computes metrics (evidence: `src/tune_classification.py`)
- Model registry → Paths and feature schema: uses settings (evidence: `src/registry.py`)
- Classification training → MLflow tracking: logs experiments (evidence: `README.md`)
- Model registry → MLflow tracking: tracks versions (evidence: `README.md`)
