# tahanadeem112299/customer_churn_model architecture

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

- Interactive diagram: https://gitdiagram.com/tahanadeem112299/customer_churn_model
- Repository: https://github.com/tahanadeem112299/customer_churn_model

## Overview

This repository is a small telecom churn prediction application with a separate model-training script and a Streamlit inference interface. Training reads the CSV, fits a preprocessing-and-classification pipeline, and saves a model artifact; the interface collects customer attributes, loads that artifact, and displays a churn probability. The excerpts show these file-level relationships directly. The ZIP archive and helper script are not part of the demonstrated runtime workflow.

Main entry points: [`testing.py`](https://github.com/tahanadeem112299/customer_churn_model/blob/main/testing.py) (Prediction interface), [`model_training.py`](https://github.com/tahanadeem112299/customer_churn_model/blob/main/model_training.py) (Model training), [`telecom_model.pkl`](https://github.com/tahanadeem112299/customer_churn_model/blob/main/telecom_model.pkl) (Trained model), [`training_data.csv`](https://github.com/tahanadeem112299/customer_churn_model/blob/main/training_data.csv) (Training data)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_training["Model training"]
  node_training_data["Training data<br/>[training_data.csv]"]
  node_trainer["Model training<br/>[model_training.py]"]
  node_model["Trained model<br/>[telecom_model.pkl]"]
end

subgraph group_inference["Churn inference"]
  node_churn_app["Prediction interface<br/>[testing.py]"]
end

node_operator(("Operator"))
node_customer_user(("Customer user"))

node_trainer -->|"reads"| node_training_data
node_trainer -->|"saves"| node_model
node_customer_user -->|"enters attributes"| node_churn_app
node_churn_app -->|"loads and predicts"| node_model
node_churn_app -->|"displays result"| node_customer_user

click node_training_data "https://github.com/tahanadeem112299/customer_churn_model/blob/main/training_data.csv"
click node_trainer "https://github.com/tahanadeem112299/customer_churn_model/blob/main/model_training.py"
click node_model "https://github.com/tahanadeem112299/customer_churn_model/blob/main/telecom_model.pkl"
click node_churn_app "https://github.com/tahanadeem112299/customer_churn_model/blob/main/testing.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_training_data,node_trainer,node_model,node_customer_user toneBlue
class node_churn_app toneAmber
class node_operator toneIndigo
```

## Components

### Model training

- [Training data](https://github.com/tahanadeem112299/customer_churn_model/blob/main/training_data.csv): `training_data.csv`
- [Model training](https://github.com/tahanadeem112299/customer_churn_model/blob/main/model_training.py): `model_training.py`
- [Trained model](https://github.com/tahanadeem112299/customer_churn_model/blob/main/telecom_model.pkl): `telecom_model.pkl`

### Churn inference

- [Prediction interface](https://github.com/tahanadeem112299/customer_churn_model/blob/main/testing.py): `testing.py`

### Other components

- **Operator**
- **Customer user**

## Connections

- Model training → Training data: reads (evidence: `model_training.py`)
- Model training → Trained model: saves (evidence: `model_training.py`)
- Customer user → Prediction interface: enters attributes (evidence: `testing.py`)
- Prediction interface → Trained model: loads and predicts (evidence: `testing.py`)
- Prediction interface → Customer user: displays result (evidence: `testing.py`)
