# ganesh-dark/tamil-news-classifier architecture

> Architecture diagram of the GitHub repository ganesh-dark/tamil-news-classifier, 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/ganesh-dark/tamil-news-classifier
- Repository: https://github.com/ganesh-dark/tamil-news-classifier

## Overview

This repository presents a Tamil-English, multi-label news classifier built by fine-tuning Qwen 2.5 7B. The documented user workflow sends a headline or article to the quantized model through Ollama and receives one or more topic labels. A separate training workflow uses the labeled TSV dataset and Colab notebook to fine-tune and export model weights. The Python package currently exposes only a placeholder greeting, so it is not part of the documented inference path. Training and inference links are based on README descriptions; the model and Modelfile are not present in the tree.

Main entry points: [`train_news_unsloth_colab.ipynb`](https://github.com/ganesh-dark/tamil-news-classifier/blob/main/train_news_unsloth_colab.ipynb) (Colab fine-tuning workflow), [`Training_news_dataset.tsv`](https://github.com/ganesh-dark/tamil-news-classifier/blob/main/Training_news_dataset.tsv) (Labeled news dataset), [`README.md`](https://github.com/ganesh-dark/tamil-news-classifier/blob/main/README.md) (83-topic taxonomy), [`src/tamil_news_classifier/__init__.py`](https://github.com/ganesh-dark/tamil-news-classifier/blob/main/src/tamil_news_classifier/__init__.py) (Python package entry)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_inference["Classification inference"]
  node_ollama["Ollama runtime"]
  node_model["Fine-tuned Qwen model"]
  node_taxonomy["83-topic taxonomy<br/>[README.md]"]
  node_labels["Predicted topic labels"]
end

subgraph group_training["Model training"]
  node_dataset["Labeled news dataset"]
  node_notebook["Colab fine-tuning workflow"]
  node_base["Qwen base model"]
  node_unsloth["Unsloth framework"]
end

subgraph group_runtime["Python package"]
  node_package["Python package entry<br/>[__init__.py]"]
end

node_user(("News user"))

node_user -->|"submits headline"| node_ollama
node_ollama -->|"runs inference"| node_model
node_model -->|"generates labels"| node_labels
node_model -->|"classifies into"| node_taxonomy
node_dataset -->|"provides examples"| node_notebook
node_base -->|"provides starting model"| node_notebook
node_unsloth -->|"supports fine-tuning"| node_notebook
node_notebook -->|"exports quantized model"| node_model
node_user -->|"invokes CLI"| node_package

click node_taxonomy "https://github.com/ganesh-dark/tamil-news-classifier/blob/main/README.md"
click node_dataset "https://github.com/ganesh-dark/tamil-news-classifier/blob/main/Training_news_dataset.tsv"
click node_notebook "https://github.com/ganesh-dark/tamil-news-classifier/blob/main/train_news_unsloth_colab.ipynb"
click node_package "https://github.com/ganesh-dark/tamil-news-classifier/blob/main/src/tamil_news_classifier/__init__.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_ollama,node_model,node_taxonomy,node_labels,node_user toneBlue
class node_dataset,node_notebook,node_base,node_unsloth toneAmber
class node_package toneMint
```

## Components

### Classification inference

- **Ollama runtime**
- **Fine-tuned Qwen model**
- [83-topic taxonomy](https://github.com/ganesh-dark/tamil-news-classifier/blob/main/README.md): `README.md`
- **Predicted topic labels**

### Model training

- [Labeled news dataset](https://github.com/ganesh-dark/tamil-news-classifier/blob/main/Training_news_dataset.tsv): `Training_news_dataset.tsv`
- [Colab fine-tuning workflow](https://github.com/ganesh-dark/tamil-news-classifier/blob/main/train_news_unsloth_colab.ipynb): `train_news_unsloth_colab.ipynb`
- **Qwen base model**
- **Unsloth framework**

### Python package

- [Python package entry](https://github.com/ganesh-dark/tamil-news-classifier/blob/main/src/tamil_news_classifier/__init__.py): `src/tamil_news_classifier/__init__.py`

### Other components

- **News user**

## Connections

- News user → Ollama runtime: submits headline (evidence: `README.md`)
- Ollama runtime → Fine-tuned Qwen model: runs inference (evidence: `README.md`)
- Fine-tuned Qwen model → Predicted topic labels: generates labels (evidence: `README.md`)
- Fine-tuned Qwen model → 83-topic taxonomy: classifies into (evidence: `README.md`)
- Labeled news dataset → Colab fine-tuning workflow: provides examples (evidence: `README.md`)
- Qwen base model → Colab fine-tuning workflow: provides starting model (evidence: `README.md`)
- Unsloth framework → Colab fine-tuning workflow: supports fine-tuning (evidence: `README.md`)
- Colab fine-tuning workflow → Fine-tuned Qwen model: exports quantized model (evidence: `README.md`)
- News user → Python package entry: invokes CLI
