How meiramalu/iis works
This repository classifies audio as classical or rock, with a Flask interface for browsing evaluation results, classifying an uploaded song, and retraining. The main workflow extracts audio features, trains a PyTorch classifier, and returns a genre prediction; offline evaluation and saved artifacts support the web app. Source excerpts show the key calls and file reads/writes. The interface template’s detailed behavior and other unsampled implementation details are not inferred.
Main entry points: app.py Flask routes · genre_classifier.py Training workflow · dataset.csv Feature dataset · metrics.json Evaluation results
Components 14
Web interface
- Flask routes
app.py - Web page
templates/index.html - Uploaded audio
Audio and dataset
- Genre audio corpus
data - Feature extraction
genre_classifier.py - Dataset builder
genre_classifier.py
Model and evaluation
- Training workflow
genre_classifier.py - Neural-network training
genre_classifier.py - Leave-one-out evaluation
genre_classifier.py - Genre prediction
genre_classifier.py
Saved artifacts
- Feature dataset
dataset.csv - Evaluation results
metrics.json - Trained model
model.pt
Other components
- User
Connections 20
- User → Flask routes: uses
README.md - Flask routes → Web page: renders
app.py - User → Uploaded audio: submits song
README.md - Uploaded audio → Flask routes: uploaded file
app.py - Flask routes → Feature extraction: extracts features
app.py - Flask routes → Genre prediction: predicts genre
app.py - Genre audio corpus → Dataset builder: audio inputs
README.md - Dataset builder → Feature extraction: extracts features
genre_classifier.py - Dataset builder → Feature dataset: writes dataset
genre_classifier.py - Training workflow → Dataset builder: builds dataset
genre_classifier.py - Training workflow → Neural-network training: trains models
genre_classifier.py - Training workflow → Leave-one-out evaluation: evaluates predictions
genre_classifier.py - Training workflow → Evaluation results: writes metrics
genre_classifier.py - Training workflow → Trained model: saves model
genre_classifier.py - Neural-network training → Genre prediction: provides model
genre_classifier.py - Leave-one-out evaluation → Genre prediction: scores held-out songs
genre_classifier.py - Flask routes → Trained model: loads checkpoint
app.py - Flask routes → Evaluation results: reads results
app.py - Flask routes → Feature dataset: reads dataset
app.py - Flask routes → Training workflow: retrain request
app.py