# adarshiserit/kannada-sentiment-analysis-model architecture

> Architecture diagram of the GitHub repository adarshiserit/kannada-sentiment-analysis-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/adarshiserit/kannada-sentiment-analysis-model
- Repository: https://github.com/adarshiserit/kannada-sentiment-analysis-model

## Overview

KannadaSentiment provides interactive and CLI Kannada emotion inference, plus a separate model-training and evaluation workflow. Training cleans labeled Excel data, creates TF-IDF and MuRIL features, fits classifiers, and evaluates their weighted ensemble; inference combines the saved models’ probabilities. The dashboard supports single-text and batch Excel predictions, while a separate script builds a PDF report from evaluation artifacts. Unsampled orchestrator and dashboard wiring is included only where the README or SOURCE INDEX establishes it.

Main entry points: [`agents/orchestrator_agent.py`](https://github.com/adarshiserit/kannada-sentiment-analysis-model/blob/main/agents/orchestrator_agent.py) (Pipeline orchestrator), [`agents/prediction_agent.py`](https://github.com/adarshiserit/kannada-sentiment-analysis-model/blob/main/agents/prediction_agent.py) (Prediction agent), [`app/dashboard.py`](https://github.com/adarshiserit/kannada-sentiment-analysis-model/blob/main/app/dashboard.py) (Streamlit dashboard), [`generate_report.py`](https://github.com/adarshiserit/kannada-sentiment-analysis-model/blob/main/generate_report.py) (PDF report generator)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_inference["Emotion inference"]
  node_dashboard["Streamlit dashboard<br/>[dashboard.py]"]
  node_cli["CLI predictor<br/>[predict.py]"]
  node_predictor["Prediction agent"]
end

subgraph group_training["Model training"]
  node_train_entry["Training command<br/>[train.py]"]
  node_orchestrator["Pipeline orchestrator"]
  node_data_agent["Data cleaning<br/>[data_agent.py]"]
  node_features["Feature extraction<br/>[feature_agent.py]"]
  node_trainer["Classifier training<br/>[training_agent.py]"]
end

subgraph group_evaluation["Evaluation and reporting"]
  node_evaluator["Ensemble evaluation"]
  node_report["PDF report generator<br/>[generate_report.py]"]
end

subgraph group_assets["Project data and outputs"]
  node_models[("Saved models")]
  node_dataset["Labeled Excel data<br/>[dataset.xlsx]"]
  node_artifacts[("Evaluation artifacts")]
  node_pdf["PDF report"]
end

node_user(("Text user"))
node_excel_user(("Excel user"))
node_muril{{"MuRIL model service"}}

node_user -->|"enters text"| node_dashboard
node_excel_user -->|"uploads workbook"| node_dashboard
node_dashboard -->|"requests predictions"| node_predictor
node_cli -->|"requests predictions"| node_predictor
node_predictor -->|"loads classifiers"| node_models
node_predictor -.->|"loads MuRIL"| node_muril
node_train_entry -->|"starts pipeline"| node_orchestrator
node_dataset -->|"provides labeled rows"| node_data_agent
node_orchestrator -->|"loads and cleans"| node_data_agent
node_orchestrator -->|"extracts features"| node_features
node_features -->|"embeds Kannada text"| node_muril
node_orchestrator -->|"trains classifiers"| node_trainer
node_trainer -->|"saves models"| node_models
node_orchestrator -->|"evaluates ensemble"| node_evaluator
node_evaluator -->|"writes metrics"| node_artifacts
node_report -->|"reads evaluation outputs"| node_artifacts
node_report -->|"generates report"| node_pdf

click node_dashboard "https://github.com/adarshiserit/kannada-sentiment-analysis-model/blob/main/app/dashboard.py"
click node_cli "https://github.com/adarshiserit/kannada-sentiment-analysis-model/blob/main/predict.py"
click node_predictor "https://github.com/adarshiserit/kannada-sentiment-analysis-model/blob/main/agents/prediction_agent.py"
click node_models "https://github.com/adarshiserit/kannada-sentiment-analysis-model/tree/main/models"
click node_dataset "https://github.com/adarshiserit/kannada-sentiment-analysis-model/blob/main/dataset.xlsx"
click node_train_entry "https://github.com/adarshiserit/kannada-sentiment-analysis-model/blob/main/train.py"
click node_orchestrator "https://github.com/adarshiserit/kannada-sentiment-analysis-model/blob/main/agents/orchestrator_agent.py"
click node_data_agent "https://github.com/adarshiserit/kannada-sentiment-analysis-model/blob/main/agents/data_agent.py"
click node_features "https://github.com/adarshiserit/kannada-sentiment-analysis-model/blob/main/agents/feature_agent.py"
click node_trainer "https://github.com/adarshiserit/kannada-sentiment-analysis-model/blob/main/agents/training_agent.py"
click node_evaluator "https://github.com/adarshiserit/kannada-sentiment-analysis-model/blob/main/agents/evaluation_agent.py"
click node_artifacts "https://github.com/adarshiserit/kannada-sentiment-analysis-model/tree/main/artifacts"
click node_report "https://github.com/adarshiserit/kannada-sentiment-analysis-model/blob/main/generate_report.py"
click node_pdf "https://github.com/adarshiserit/kannada-sentiment-analysis-model/blob/main/artifacts/sentiment_report.pdf"

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_dashboard,node_cli,node_predictor,node_user,node_excel_user toneBlue
class node_train_entry,node_orchestrator,node_data_agent,node_features,node_trainer toneAmber
class node_evaluator,node_report toneMint
class node_models,node_dataset,node_artifacts,node_pdf toneRose
class node_muril toneIndigo
```

## Components

### Emotion inference

- [Streamlit dashboard](https://github.com/adarshiserit/kannada-sentiment-analysis-model/blob/main/app/dashboard.py): `app/dashboard.py`
- [CLI predictor](https://github.com/adarshiserit/kannada-sentiment-analysis-model/blob/main/predict.py): `predict.py`
- [Prediction agent](https://github.com/adarshiserit/kannada-sentiment-analysis-model/blob/main/agents/prediction_agent.py): `agents/prediction_agent.py`

### Model training

- [Training command](https://github.com/adarshiserit/kannada-sentiment-analysis-model/blob/main/train.py): `train.py`
- [Pipeline orchestrator](https://github.com/adarshiserit/kannada-sentiment-analysis-model/blob/main/agents/orchestrator_agent.py): `agents/orchestrator_agent.py`
- [Data cleaning](https://github.com/adarshiserit/kannada-sentiment-analysis-model/blob/main/agents/data_agent.py): `agents/data_agent.py`
- [Feature extraction](https://github.com/adarshiserit/kannada-sentiment-analysis-model/blob/main/agents/feature_agent.py): `agents/feature_agent.py`
- [Classifier training](https://github.com/adarshiserit/kannada-sentiment-analysis-model/blob/main/agents/training_agent.py): `agents/training_agent.py`

### Evaluation and reporting

- [Ensemble evaluation](https://github.com/adarshiserit/kannada-sentiment-analysis-model/blob/main/agents/evaluation_agent.py): `agents/evaluation_agent.py`
- [PDF report generator](https://github.com/adarshiserit/kannada-sentiment-analysis-model/blob/main/generate_report.py): `generate_report.py`

### Project data and outputs

- [Saved models](https://github.com/adarshiserit/kannada-sentiment-analysis-model/tree/main/models): `models`
- [Labeled Excel data](https://github.com/adarshiserit/kannada-sentiment-analysis-model/blob/main/dataset.xlsx): `dataset.xlsx`
- [Evaluation artifacts](https://github.com/adarshiserit/kannada-sentiment-analysis-model/tree/main/artifacts): `artifacts`
- [PDF report](https://github.com/adarshiserit/kannada-sentiment-analysis-model/blob/main/artifacts/sentiment_report.pdf): `artifacts/sentiment_report.pdf`

### Other components

- **Text user**
- **Excel user**
- **MuRIL model service**

## Connections

- Text user → Streamlit dashboard: enters text (evidence: `README.md`)
- Excel user → Streamlit dashboard: uploads workbook (evidence: `README.md`)
- Streamlit dashboard → Prediction agent: requests predictions (evidence: `app/dashboard.py`)
- CLI predictor → Prediction agent: requests predictions (evidence: `predict.py`)
- Prediction agent → Saved models: loads classifiers (evidence: `agents/prediction_agent.py`)
- Prediction agent → MuRIL model service: loads MuRIL (evidence: `README.md`)
- Training command → Pipeline orchestrator: starts pipeline (evidence: `train.py`)
- Labeled Excel data → Data cleaning: provides labeled rows (evidence: `README.md`)
- Pipeline orchestrator → Data cleaning: loads and cleans (evidence: `agents/orchestrator_agent.py`)
- Pipeline orchestrator → Feature extraction: extracts features (evidence: `agents/orchestrator_agent.py`)
- Feature extraction → MuRIL model service: embeds Kannada text (evidence: `agents/feature_agent.py`)
- Pipeline orchestrator → Classifier training: trains classifiers (evidence: `README.md`)
- Classifier training → Saved models: saves models (evidence: `agents/training_agent.py`)
- Pipeline orchestrator → Ensemble evaluation: evaluates ensemble (evidence: `README.md`)
- Ensemble evaluation → Evaluation artifacts: writes metrics (evidence: `agents/evaluation_agent.py`)
- PDF report generator → Evaluation artifacts: reads evaluation outputs (evidence: `generate_report.py`)
- PDF report generator → PDF report: generates report (evidence: `README.md`)
