How chitranshu0/music-recommendation-system works
Project type and purpose
• This is a full-stack, single-page Flask web application that serves as a music recommendation system.
• Purpose: Users enter a song name via a web form; the backend uses a pre-trained ML model (CountVectorizer + cosine similarity) to return a list of similar songs.
File structure
• Top-level:
• app.py – Flask application entry point
• data/ – raw CSV (ex.csv) of song features
• model/ – serialized artifacts (musicrec.pkl, similarities.pkl) and a CSV copy
• static/ – CSS file for styling
• templates/ – Jinja2 HTML views (index.html, recommend.html)
• Training Notebooks (optional) – illustrate model-building process but not part of runtime
• No separate frontend framework; UI lives in Flask’s templates.
• No external database: recommendations run in memory, loading pickles and CSV at startup.
README for additional insights
• Tech stack: Python (pandas, scikit-learn), Flask, CountVectorizer, Cosine Similarity
• Workflow: Data cleaning → vectorization → similarity matrix → serve via web form.
Elements
– Clear labels: “Browser,” “Flask app.py,” “Recommendation Engine,” “Pickle Files,” “Templates/Static”
• Browser → Flask (form data)
• Flask → Recommendation Engine (function call)
• Engine → Data Storage (file read)
• Flask → Browser (HTML response)
• Rectangle (services/components)