# krish27naa/telecom-churn-prediction architecture

> Architecture diagram of the GitHub repository krish27naa/telecom-churn-prediction, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-06). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/krish27naa/telecom-churn-prediction
- Repository: https://github.com/krish27naa/telecom-churn-prediction

## Overview

This is a Streamlit customer-churn risk application. An operator enters customer attributes, submits them for XGBoost inference, and receives a probability, risk category, retention priority, tailored recommendation, and customer summary. The runtime is concentrated in App.py; the persisted XGBoost model is the only model artifact the sampled code loads. The tree also contains training and reporting artifacts, but no README or source evidence connects them to this runtime, so they are not shown as active workflow components.

Main entry points: [`AI_Project/AI_Project/App.py`](https://github.com/krish27naa/telecom-churn-prediction/blob/main/AI_Project/AI_Project/App.py) (Churn Scoring), [`AI_Project/AI_Project/outputs/models/xgboost.pkl`](https://github.com/krish27naa/telecom-churn-prediction/blob/main/AI_Project/AI_Project/outputs/models/xgboost.pkl) (XGBoost Model)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_capture["Customer Input"]
  node_customer_form["Customer Form<br/>[App.py]"]
  node_customer_record["Customer Record<br/>[App.py]"]
end

subgraph group_inference["Churn Assessment"]
  node_xgboost_model["XGBoost Model<br/>[xgboost.pkl]"]
  node_churn_scoring["Churn Scoring<br/>[App.py]"]
  node_risk_classification["Risk Classification<br/>[App.py]"]
end

subgraph group_response["Retention Results"]
  node_retention_guidance["Retention Guidance<br/>[App.py]"]
  node_results_display["Results Display<br/>[App.py]"]
end

node_operator(("Operator"))

node_operator -->|"enters details"| node_customer_form
node_customer_form -->|"builds record"| node_customer_record
node_churn_scoring -->|"loads model"| node_xgboost_model
node_churn_scoring -->|"requests probabilities"| node_xgboost_model
node_churn_scoring -->|"scores record"| node_customer_record
node_churn_scoring -->|"classifies score"| node_risk_classification
node_risk_classification -->|"selects action"| node_retention_guidance
node_risk_classification -->|"provides risk"| node_results_display
node_retention_guidance -->|"provides recommendation"| node_results_display
node_operator -->|"submits prediction"| node_churn_scoring

click node_customer_form "https://github.com/krish27naa/telecom-churn-prediction/blob/main/AI_Project/AI_Project/App.py"
click node_customer_record "https://github.com/krish27naa/telecom-churn-prediction/blob/main/AI_Project/AI_Project/App.py"
click node_xgboost_model "https://github.com/krish27naa/telecom-churn-prediction/blob/main/AI_Project/AI_Project/outputs/models/xgboost.pkl"
click node_churn_scoring "https://github.com/krish27naa/telecom-churn-prediction/blob/main/AI_Project/AI_Project/App.py"
click node_risk_classification "https://github.com/krish27naa/telecom-churn-prediction/blob/main/AI_Project/AI_Project/App.py"
click node_retention_guidance "https://github.com/krish27naa/telecom-churn-prediction/blob/main/AI_Project/AI_Project/App.py"
click node_results_display "https://github.com/krish27naa/telecom-churn-prediction/blob/main/AI_Project/AI_Project/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_customer_form,node_customer_record toneBlue
class node_xgboost_model,node_churn_scoring,node_risk_classification toneAmber
class node_retention_guidance,node_results_display toneMint
class node_operator toneIndigo
```

## Components

### Customer Input

- [Customer Form](https://github.com/krish27naa/telecom-churn-prediction/blob/main/AI_Project/AI_Project/App.py): `AI_Project/AI_Project/App.py`
- [Customer Record](https://github.com/krish27naa/telecom-churn-prediction/blob/main/AI_Project/AI_Project/App.py): `AI_Project/AI_Project/App.py`

### Churn Assessment

- [XGBoost Model](https://github.com/krish27naa/telecom-churn-prediction/blob/main/AI_Project/AI_Project/outputs/models/xgboost.pkl): `AI_Project/AI_Project/outputs/models/xgboost.pkl`
- [Churn Scoring](https://github.com/krish27naa/telecom-churn-prediction/blob/main/AI_Project/AI_Project/App.py): `AI_Project/AI_Project/App.py`
- [Risk Classification](https://github.com/krish27naa/telecom-churn-prediction/blob/main/AI_Project/AI_Project/App.py): `AI_Project/AI_Project/App.py`

### Retention Results

- [Retention Guidance](https://github.com/krish27naa/telecom-churn-prediction/blob/main/AI_Project/AI_Project/App.py): `AI_Project/AI_Project/App.py`
- [Results Display](https://github.com/krish27naa/telecom-churn-prediction/blob/main/AI_Project/AI_Project/App.py): `AI_Project/AI_Project/App.py`

### Other components

- **Operator**

## Connections

- Operator → Customer Form: enters details (evidence: `AI_Project/AI_Project/App.py`)
- Customer Form → Customer Record: builds record (evidence: `AI_Project/AI_Project/App.py`)
- Churn Scoring → XGBoost Model: loads model (evidence: `AI_Project/AI_Project/App.py`)
- Churn Scoring → XGBoost Model: requests probabilities (evidence: `AI_Project/AI_Project/App.py`)
- Churn Scoring → Customer Record: scores record (evidence: `AI_Project/AI_Project/App.py`)
- Churn Scoring → Risk Classification: classifies score (evidence: `AI_Project/AI_Project/App.py`)
- Risk Classification → Retention Guidance: selects action (evidence: `AI_Project/AI_Project/App.py`)
- Risk Classification → Results Display: provides risk (evidence: `AI_Project/AI_Project/App.py`)
- Retention Guidance → Results Display: provides recommendation (evidence: `AI_Project/AI_Project/App.py`)
- Operator → Churn Scoring: submits prediction (evidence: `AI_Project/AI_Project/App.py`)
