# ganeshabothu1/fake_new_dect architecture

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

- Interactive diagram: https://gitdiagram.com/ganeshabothu1/fake_new_dect
- Repository: https://github.com/ganeshabothu1/fake_new_dect

## Overview

This repository presents a Flask web app for classifying news as fake or true. The user submits article text; the app produces a classification using a machine-learning/NLP workflow involving text features and a trained model. The README documents preprocessing, feature extraction, and prediction, while the source index shows the app’s Flask and joblib dependencies and the training module’s pandas, scikit-learn, and joblib dependencies. Source excerpts do not show the app-to-model call or individual training steps, so those links are marked unverified.

Main entry points: [`app.py`](https://github.com/ganeshabothu1/fake_new_dect/blob/main/app.py) (Request and result handling), [`fake_news.py`](https://github.com/ganeshabothu1/fake_new_dect/blob/main/fake_news.py) (Model training and prediction), [`Lib/site-packages/flask/app.py`](https://github.com/ganeshabothu1/fake_new_dect/blob/main/Lib/site-packages/flask/app.py) (Flask runtime)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web application"]
  node_flask["Flask runtime<br/>[app.py]"]
  node_webapp["Request and result handling<br/>[app.py]"]
end

subgraph group_ml["Detection workflow"]
  node_prep["Text preprocessing<br/>[fake_news.py]"]
  node_features["Text features<br/>[fake_news.py]"]
  node_classifier["Model training and prediction<br/>[fake_news.py]"]
end

subgraph group_data["Training data"]
  node_training_data["News training data"]
end

node_visitor(("Article submitter"))

node_visitor -.->|"submits article"| node_webapp
node_webapp -->|"uses framework"| node_flask
node_webapp -.->|"loads or invokes"| node_classifier
node_training_data -.->|"provides text"| node_prep
node_prep -.->|"transforms text"| node_features
node_features -.->|"feeds training"| node_classifier
node_classifier -.->|"returns prediction"| node_webapp

click node_flask "https://github.com/ganeshabothu1/fake_new_dect/blob/main/Lib/site-packages/flask/app.py"
click node_webapp "https://github.com/ganeshabothu1/fake_new_dect/blob/main/app.py"
click node_prep "https://github.com/ganeshabothu1/fake_new_dect/blob/main/fake_news.py"
click node_features "https://github.com/ganeshabothu1/fake_new_dect/blob/main/fake_news.py"
click node_classifier "https://github.com/ganeshabothu1/fake_new_dect/blob/main/fake_news.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_flask,node_webapp toneBlue
class node_prep,node_features,node_classifier toneAmber
class node_training_data toneMint
class node_visitor toneIndigo
```

## Components

### Web application

- [Flask runtime](https://github.com/ganeshabothu1/fake_new_dect/blob/main/Lib/site-packages/flask/app.py): `Lib/site-packages/flask/app.py`
- [Request and result handling](https://github.com/ganeshabothu1/fake_new_dect/blob/main/app.py): `app.py`

### Detection workflow

- [Text preprocessing](https://github.com/ganeshabothu1/fake_new_dect/blob/main/fake_news.py): `fake_news.py`
- [Text features](https://github.com/ganeshabothu1/fake_new_dect/blob/main/fake_news.py): `fake_news.py`
- [Model training and prediction](https://github.com/ganeshabothu1/fake_new_dect/blob/main/fake_news.py): `fake_news.py`

### Training data

- **News training data**

### Other components

- **Article submitter**

## Connections

- Article submitter → Request and result handling: submits article (evidence: `README.md`)
- Request and result handling → Flask runtime: uses framework (evidence: `app.py`)
- Request and result handling → Model training and prediction: loads or invokes
- News training data → Text preprocessing: provides text
- Text preprocessing → Text features: transforms text (evidence: `README.md`)
- Text features → Model training and prediction: feeds training (evidence: `README.md`)
- Model training and prediction → Request and result handling: returns prediction (evidence: `README.md`)
