# pragna28/neuromotion-emg-demo architecture

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

- Interactive diagram: https://gitdiagram.com/pragna28/neuromotion-emg-demo
- Repository: https://github.com/pragna28/neuromotion-emg-demo

## Overview

NeuroMotion is an interactive Streamlit demo for classifying hand gestures from precomputed eight-channel EMG features. Users can inspect the overview, replay bundled feature windows, or upload feature CSVs for predictions and optional accuracy evaluation; model insights present reported performance and methodology. The sampled source shows the UI, prediction logic, and CSV handling in one file. Evidence for model loading and the artifact connection is incomplete, so that relationship is left unverified.

Main entry points: [`app.py`](https://github.com/pragna28/neuromotion-emg-demo/blob/main/app.py) (Navigation and overview), [`demo_features.csv`](https://github.com/pragna28/neuromotion-emg-demo/blob/main/demo_features.csv) (Demo feature windows), [`best_emg_gesture_model.joblib`](https://github.com/pragna28/neuromotion-emg-demo/blob/main/best_emg_gesture_model.joblib) (Trained model)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interface["Demo interface"]
  node_navigation["Navigation and overview<br/>[app.py]"]
  node_replay["Gesture replay<br/>[app.py]"]
  node_upload["CSV upload<br/>[app.py]"]
  node_insights["Model insights<br/>[app.py]"]
end

subgraph group_inference["Gesture inference"]
  node_predictor["Gesture prediction<br/>[app.py]"]
  node_probability["Probability chart<br/>[app.py]"]
  node_evaluation["Label evaluation<br/>[app.py]"]
end

subgraph group_data["Feature data"]
  node_demo_csv["Demo feature windows<br/>[demo_features.csv]"]
  node_model["Trained model"]
end

node_user(("User"))

node_user -->|"uses"| node_navigation
node_navigation -->|"selects"| node_replay
node_navigation -->|"selects"| node_upload
node_navigation -->|"selects"| node_insights
node_replay -->|"reads"| node_demo_csv
node_replay -->|"predicts window"| node_predictor
node_upload -->|"predicts rows"| node_predictor
node_predictor -->|"plots probabilities"| node_probability
node_upload -->|"scores labels"| node_evaluation
node_predictor -.->|"uses model"| node_model

click node_navigation "https://github.com/pragna28/neuromotion-emg-demo/blob/main/app.py"
click node_replay "https://github.com/pragna28/neuromotion-emg-demo/blob/main/app.py"
click node_upload "https://github.com/pragna28/neuromotion-emg-demo/blob/main/app.py"
click node_insights "https://github.com/pragna28/neuromotion-emg-demo/blob/main/app.py"
click node_predictor "https://github.com/pragna28/neuromotion-emg-demo/blob/main/app.py"
click node_probability "https://github.com/pragna28/neuromotion-emg-demo/blob/main/app.py"
click node_evaluation "https://github.com/pragna28/neuromotion-emg-demo/blob/main/app.py"
click node_demo_csv "https://github.com/pragna28/neuromotion-emg-demo/blob/main/demo_features.csv"
click node_model "https://github.com/pragna28/neuromotion-emg-demo/blob/main/best_emg_gesture_model.joblib"

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_navigation,node_replay,node_upload,node_insights,node_user toneBlue
class node_predictor,node_probability,node_evaluation toneAmber
class node_demo_csv,node_model toneMint
```

## Components

### Demo interface

- [Navigation and overview](https://github.com/pragna28/neuromotion-emg-demo/blob/main/app.py): `app.py`
- [Gesture replay](https://github.com/pragna28/neuromotion-emg-demo/blob/main/app.py): `app.py`
- [CSV upload](https://github.com/pragna28/neuromotion-emg-demo/blob/main/app.py): `app.py`
- [Model insights](https://github.com/pragna28/neuromotion-emg-demo/blob/main/app.py): `app.py`

### Gesture inference

- [Gesture prediction](https://github.com/pragna28/neuromotion-emg-demo/blob/main/app.py): `app.py`
- [Probability chart](https://github.com/pragna28/neuromotion-emg-demo/blob/main/app.py): `app.py`
- [Label evaluation](https://github.com/pragna28/neuromotion-emg-demo/blob/main/app.py): `app.py`

### Feature data

- [Demo feature windows](https://github.com/pragna28/neuromotion-emg-demo/blob/main/demo_features.csv): `demo_features.csv`
- [Trained model](https://github.com/pragna28/neuromotion-emg-demo/blob/main/best_emg_gesture_model.joblib): `best_emg_gesture_model.joblib`

### Other components

- **User**

## Connections

- User → Navigation and overview: uses (evidence: `app.py`)
- Navigation and overview → Gesture replay: selects (evidence: `app.py`)
- Navigation and overview → CSV upload: selects (evidence: `app.py`)
- Navigation and overview → Model insights: selects (evidence: `app.py`)
- Gesture replay → Demo feature windows: reads (evidence: `app.py`)
- Gesture replay → Gesture prediction: predicts window (evidence: `app.py`)
- CSV upload → Gesture prediction: predicts rows (evidence: `app.py`)
- Gesture prediction → Probability chart: plots probabilities (evidence: `app.py`)
- CSV upload → Label evaluation: scores labels (evidence: `app.py`)
- Gesture prediction → Trained model: uses model
