Skip to content

About

Music Playlist Generation System is a Flask web app for discovering similar tracks. Search by song or artist, choose a genre, or upload audio to get recommendations based on music features from the included FMA dataset. View YouTube and Spotify search links, and export playlists as CSV or JSON.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

🎡 MY-MUSIC

MY-MUSIC is a Python-based music application that provides a simple and interactive platform for working with music data and generating music-related predictions/recommendations. The project uses Flask for the web application and Python-based machine learning components for prediction.


πŸš€ Features

  • 🎡 Music-focused web application
  • 🌐 Flask-based backend
  • πŸ€– Machine Learning model integration
  • πŸ’Ύ Trained model stored using Pickle/Joblib
  • πŸ“Š Data processing and prediction
  • πŸ–₯️ Web-based user interface
  • πŸ“ Modular project structure
  • πŸ”§ Easy local deployment

πŸ› οΈ Technologies Used

Backend

  • Python
  • Flask

Machine Learning

  • Scikit-learn
  • NumPy
  • Pandas
  • Joblib / Pickle

Frontend

  • HTML5
  • CSS3
  • JavaScript
  • Bootstrap

Tools

  • Git
  • GitHub
  • VS Code

πŸ“‚ Project Structure

MY-MUSIC/
β”‚
β”œβ”€β”€ Deployment/
β”‚   └── app1.py
β”‚
β”œβ”€β”€ templates/
β”‚   └── *.html
β”‚
β”œβ”€β”€ static/
β”‚   β”œβ”€β”€ css/
β”‚   β”œβ”€β”€ js/
β”‚   └── images/
β”‚
β”œβ”€β”€ model/
β”‚   └── model.pkl
β”‚
β”œβ”€β”€ dataset/
β”‚   └── *.csv
β”‚
β”œβ”€β”€ requirements.txt
β”œβ”€β”€ README.md
└── .gitignore

The exact folder structure may vary depending on the version of the project.


βš™οΈ Installation

1. Clone the repository

git clone <YOUR_GITHUB_REPOSITORY_URL>

Navigate into the project:

cd MY-MUSIC

2. Create a Virtual Environment

Python 3.12 is recommended for this project.

py -3.12 -m venv venv

Activate the environment on Windows:

venv\Scripts\activate

You should see:

(venv)

in your terminal.


3. Upgrade pip

python -m pip install --upgrade pip

4. Install Dependencies

If requirements.txt is available:

pip install -r requirements.txt

Otherwise, install Flask and the required ML libraries:

pip install flask pandas numpy scikit-learn joblib

▢️ Running the Application

Activate the virtual environment:

venv\Scripts\activate

Run the Flask application:

python Deployment\app1.py

If the application starts successfully, Flask will display a local address similar to:

http://127.0.0.1:5000

Open the URL in your browser.


πŸ€– Machine Learning Model

The project can use a previously trained machine learning model stored as a serialized file.

For example:

model.pkl

or:

model.joblib

Loading a Joblib Model

import joblib

model = joblib.load("model.pkl")

Loading a Pickle Model

import pickle

with open("model.pkl", "rb") as file:
    model = pickle.load(file)

The loaded model can then be used to generate predictions:

prediction = model.predict(input_data)

πŸ”„ Application Workflow

User
  β”‚
  β–Ό
Web Interface
  β”‚
  β–Ό
Flask Application
  β”‚
  β–Ό
Input Processing
  β”‚
  β–Ό
Trained ML Model
  β”‚
  β–Ό
Prediction / Recommendation
  β”‚
  β–Ό
Result Displayed to User

πŸ“‹ Requirements

Recommended environment:

Python 3.12
Flask
NumPy
Pandas
Scikit-learn
Joblib

For reproducible installation, use:

pip install -r requirements.txt

πŸ” Environment Variables

If the application requires environment variables, create a .env file:

SECRET_KEY=your_secret_key

Do not commit sensitive information such as:

  • API keys
  • Passwords
  • Database credentials
  • Secret keys

Add .env to .gitignore.


πŸ§ͺ Testing

After starting the application, test the main functionality through the web interface.

You can also verify that Flask is installed:

python -c "import flask; print(flask.__version__)"

Check the Python version:

python --version

πŸ› Common Issues

Flask not found

If you receive:

ModuleNotFoundError: No module named 'flask'

Run:

python -m pip install flask

Make sure your virtual environment is activated.


Wrong Python Version

Check installed Python versions:

py --list

Use Python 3.12:

py -3.12 -m venv venv

Port Already in Use

If port 5000 is already being used, change the Flask port:

app.run(debug=True, port=5001)

Then open:

http://127.0.0.1:5001

πŸ“Œ Future Improvements

  • 🎧 Add music streaming functionality
  • πŸ” Improve music search
  • πŸ€– Improve recommendation accuracy
  • πŸ‘€ Add user authentication
  • ❀️ Add favorites and playlists
  • ☁️ Deploy the application to a cloud platform
  • πŸ“± Improve responsive/mobile UI
  • πŸ”Š Add audio preview functionality

πŸ‘¨β€πŸ’» Author

Siddesh Raut

Computer Engineering | Software Development | Machine Learning


πŸ“œ License

This project is licensed under the MIT License.

About

Music Playlist Generation System is a Flask web app for discovering similar tracks. Search by song or artist, choose a genre, or upload audio to get recommendations based on music features from the included FMA dataset. View YouTube and Spotify search links, and export playlists as CSV or JSON.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages