An AI-powered music classification system that bridges the gap between machine learning and modern web experiences. GenreSense uses a custom-trained Logistic Regression model to identify musical genres in real-time, integrated with the YouTube Music API for seamless track discovery and playback.
Immersive Hero section with integrated search entry points.
Lightning-fast search results powered by the YouTube Music API.
Detailed breakdown of features and genre probabilities processed by our Logistic Regression model.
The classification engine is built on a Logistic Regression model optimized with Principal Component Analysis (PCA).
- Dimensionality Reduction: We use PCA to compress 12 high-fidelity audio features (Tempo, Dynamics, Vocal Presence, etc.) while preserving 95% of the variance.
- Accuracy: Optimized pipeline achieving ~84.6% accuracy on the target dataset.
- Preprocessing: Robust pipeline using
StandardScalerfor normalization andLabelEncoderfor target variables.
- Frontend: Next.js 15+ (App Router), TypeScript, Framer Motion (Animations), TailwindCSS.
- Backend: FastAPI (Python), RESTful API Design, CORS Middleware.
- Audio Integration: YouTube Music API (ytmusicapi) & ReactPlayer.
- Libraries: Scikit-Learn, Pandas, NumPy.
- Serialization: Joblib (Model persistence).
- Containerization: Docker & Docker Compose (Multi-stage builds).
- Deployment: Render (Blueprints/Infrastructure as Code).
- CI/CD: Environment synchronization and standalone production builds.
├── backend/ # FastAPI + ML Inference Engine
│ └── models/ # Serialized ML Artifacts (Pickles/Joblib)
├── genresense/ # Next.js 15 Frontend (Static Export)
├── Dockerfile # Unified Root Build (Multi-stage)
├── classification.ipynb # Research, EDA & Model training
└── render.yaml # Single-service Infrastructure as Code
# Backend (FastAPI)
cd backend && pip install -r requirements.txt
uvicorn main:app --port 8000
# Frontend (Next.js)
cd genresense && npm install
npm run devThis project is optimized for a single-container deployment.
- Connect your GitHub repository to Render.
- Select Web Service.
- Render will automatically detect the root Dockerfile and deploy both the AI Backend and the UI as a single service.
Shubham Kulkarni
Full Stack Software Engineer & ML Enthusiast
Bridging the gap between complex data models and beautiful user interfaces.
⭐ If you see potential in this project, feel free to give it a star! 🌟