# vmodala-10/healing-music-recommender architecture

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

- Interactive diagram: https://gitdiagram.com/vmodala-10/healing-music-recommender
- Repository: https://github.com/vmodala-10/healing-music-recommender

## Overview

This is a healing-music recommender with Streamlit and command-line interfaces. Users can request a raga from pain, tempo, pitch, and mood; browse ragas by pain and mood; and listen to recommendations or mood-based selections. A separate training script builds the ensemble classifier and encoders used by both interfaces. The Streamlit interface also records feedback. Audio assets and runtime behavior are visible in sampled files; the README provides no further capability details. The CLI’s audio path differs from the root-level assets shown in the tree.

Main entry points: [`app.py`](https://github.com/vmodala-10/healing-music-recommender/blob/main/app.py) (Web interface), [`recommend_music.py`](https://github.com/vmodala-10/healing-music-recommender/blob/main/recommend_music.py) (CLI interface), [`music.py`](https://github.com/vmodala-10/healing-music-recommender/blob/main/music.py) (Ensemble training), [`healing_music_dataset.csv`](https://github.com/vmodala-10/healing-music-recommender/blob/main/healing_music_dataset.csv) (Healing music data)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interfaces["User interfaces"]
  node_web["Web interface<br/>[app.py]"]
  node_cli["CLI interface<br/>[recommend_music.py]"]
  node_feedback["Feedback capture<br/>[app.py]"]
end

subgraph group_recommendation["Recommendation"]
  node_web_predict["Web prediction<br/>[app.py]"]
  node_cli_predict["CLI prediction<br/>[recommend_music.py]"]
  node_audio["Audio playback<br/>[app.py]"]
  node_cli_audio["CLI audio playback<br/>[recommend_music.py]"]
end

subgraph group_exploration["Raga exploration"]
  node_web_browse["Web raga browser<br/>[app.py]"]
  node_cli_browse["CLI raga browser<br/>[recommend_music.py]"]
end

subgraph group_training["Model training"]
  node_training["Ensemble training<br/>[music.py]"]
end

subgraph group_stored["Stored data"]
  node_dataset[("Healing music data")]
  node_model["Trained ensemble<br/>[ensemble_model.pkl]"]
  node_encoders["Label encoders<br/>[label_encoders.pkl]"]
  node_feedback_store[("Feedback records<br/>[feedback.csv]")]
  node_audio_asset["Raga audio asset<br/>[abhogi.mp3]"]
end

node_user(("User"))

node_user -->|"uses"| node_web
node_user -->|"uses"| node_cli
node_web -->|"requests"| node_web_predict
node_web_predict -->|"predicts with"| node_model
node_web_predict -->|"encodes with"| node_encoders
node_web -->|"plays"| node_audio
node_audio -->|"reads"| node_audio_asset
node_web -->|"records"| node_feedback
node_feedback -->|"appends"| node_feedback_store
node_web -->|"filters"| node_web_browse
node_web_browse -->|"reads"| node_dataset
node_cli -->|"requests"| node_cli_predict
node_cli_predict -->|"predicts with"| node_model
node_cli_predict -->|"encodes with"| node_encoders
node_cli -->|"plays"| node_cli_audio
node_cli_audio -->|"loads"| node_audio_asset
node_cli -->|"filters"| node_cli_browse
node_cli_browse -->|"reads"| node_dataset
node_training -->|"trains on"| node_dataset
node_training -->|"saves"| node_model
node_training -->|"saves"| node_encoders

click node_web "https://github.com/vmodala-10/healing-music-recommender/blob/main/app.py"
click node_cli "https://github.com/vmodala-10/healing-music-recommender/blob/main/recommend_music.py"
click node_web_predict "https://github.com/vmodala-10/healing-music-recommender/blob/main/app.py"
click node_cli_predict "https://github.com/vmodala-10/healing-music-recommender/blob/main/recommend_music.py"
click node_audio "https://github.com/vmodala-10/healing-music-recommender/blob/main/app.py"
click node_cli_audio "https://github.com/vmodala-10/healing-music-recommender/blob/main/recommend_music.py"
click node_feedback "https://github.com/vmodala-10/healing-music-recommender/blob/main/app.py"
click node_web_browse "https://github.com/vmodala-10/healing-music-recommender/blob/main/app.py"
click node_cli_browse "https://github.com/vmodala-10/healing-music-recommender/blob/main/recommend_music.py"
click node_training "https://github.com/vmodala-10/healing-music-recommender/blob/main/music.py"
click node_dataset "https://github.com/vmodala-10/healing-music-recommender/blob/main/healing_music_dataset.csv"
click node_model "https://github.com/vmodala-10/healing-music-recommender/blob/main/ensemble_model.pkl"
click node_encoders "https://github.com/vmodala-10/healing-music-recommender/blob/main/label_encoders.pkl"
click node_feedback_store "https://github.com/vmodala-10/healing-music-recommender/blob/main/feedback.csv"
click node_audio_asset "https://github.com/vmodala-10/healing-music-recommender/blob/main/abhogi.mp3"

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_web,node_cli,node_feedback,node_user toneBlue
class node_web_predict,node_cli_predict,node_audio,node_cli_audio toneAmber
class node_web_browse,node_cli_browse toneMint
class node_training toneRose
class node_dataset,node_model,node_encoders,node_feedback_store,node_audio_asset toneIndigo
```

## Components

### User interfaces

- [Web interface](https://github.com/vmodala-10/healing-music-recommender/blob/main/app.py): `app.py`
- [CLI interface](https://github.com/vmodala-10/healing-music-recommender/blob/main/recommend_music.py): `recommend_music.py`
- [Feedback capture](https://github.com/vmodala-10/healing-music-recommender/blob/main/app.py): `app.py`

### Recommendation

- [Web prediction](https://github.com/vmodala-10/healing-music-recommender/blob/main/app.py): `app.py`
- [CLI prediction](https://github.com/vmodala-10/healing-music-recommender/blob/main/recommend_music.py): `recommend_music.py`
- [Audio playback](https://github.com/vmodala-10/healing-music-recommender/blob/main/app.py): `app.py`
- [CLI audio playback](https://github.com/vmodala-10/healing-music-recommender/blob/main/recommend_music.py): `recommend_music.py`

### Raga exploration

- [Web raga browser](https://github.com/vmodala-10/healing-music-recommender/blob/main/app.py): `app.py`
- [CLI raga browser](https://github.com/vmodala-10/healing-music-recommender/blob/main/recommend_music.py): `recommend_music.py`

### Model training

- [Ensemble training](https://github.com/vmodala-10/healing-music-recommender/blob/main/music.py): `music.py`

### Stored data

- [Healing music data](https://github.com/vmodala-10/healing-music-recommender/blob/main/healing_music_dataset.csv): `healing_music_dataset.csv`
- [Trained ensemble](https://github.com/vmodala-10/healing-music-recommender/blob/main/ensemble_model.pkl): `ensemble_model.pkl`
- [Label encoders](https://github.com/vmodala-10/healing-music-recommender/blob/main/label_encoders.pkl): `label_encoders.pkl`
- [Feedback records](https://github.com/vmodala-10/healing-music-recommender/blob/main/feedback.csv): `feedback.csv`
- [Raga audio asset](https://github.com/vmodala-10/healing-music-recommender/blob/main/abhogi.mp3): `abhogi.mp3`

### Other components

- **User**

## Connections

- User → Web interface: uses (evidence: `app.py`)
- User → CLI interface: uses (evidence: `recommend_music.py`)
- Web interface → Web prediction: requests (evidence: `app.py`)
- Web prediction → Trained ensemble: predicts with (evidence: `app.py`)
- Web prediction → Label encoders: encodes with (evidence: `app.py`)
- Web interface → Audio playback: plays (evidence: `app.py`)
- Audio playback → Raga audio asset: reads (evidence: `app.py`)
- Web interface → Feedback capture: records (evidence: `app.py`)
- Feedback capture → Feedback records: appends (evidence: `app.py`)
- Web interface → Web raga browser: filters (evidence: `app.py`)
- Web raga browser → Healing music data: reads (evidence: `app.py`)
- CLI interface → CLI prediction: requests (evidence: `recommend_music.py`)
- CLI prediction → Trained ensemble: predicts with (evidence: `recommend_music.py`)
- CLI prediction → Label encoders: encodes with (evidence: `recommend_music.py`)
- CLI interface → CLI audio playback: plays (evidence: `recommend_music.py`)
- CLI audio playback → Raga audio asset: loads (evidence: `recommend_music.py`)
- CLI interface → CLI raga browser: filters (evidence: `recommend_music.py`)
- CLI raga browser → Healing music data: reads (evidence: `recommend_music.py`)
- Ensemble training → Healing music data: trains on (evidence: `music.py`)
- Ensemble training → Trained ensemble: saves (evidence: `music.py`)
- Ensemble training → Label encoders: saves (evidence: `music.py`)
