This repository is for Look For Samples, allowing users to be recommended tracks based on their liking history.
The application was created using Flask and SQLite, and recommends tracks to users using content-based recommendation.
Run all commands from the root directory
- Clone this repository:
git clone https://github.com/musa-q/Music-Sample-Tinder.git
- Create a virtual environment and activate it
python -m venv venv
.\venv\Scripts\activate
- Install the required dependencies:
pip install -r requirements.txt
-
Add the file
.env
to the./app
folder, and populate the following variables: (Visit Discogs to get the relevant data)DISCOGS_CONSUMER_KEY
DISCOGS_CONSUMER_SECRET
DISCOGS_USER_AGENT=MusicTinderApp/0.1
-
Once the database has been popualted. You can run the Flask app using
python wsgi.py
- Open your web browser and navigate to http://localhost:5000. You will be able to access the site through other devices by navigating to
http://{ip address}:5000
.
To use the application, simply begin clicking the Like
or Dislike
buttons (or swiping left or right) and the application will recommend new songs.
There is also an option to Skip
tracks, if needed (such as if a YouTube video is not working).
Use the following steps to set up the database:
- Set-up the database
python .\app\__init__.py -s
- Populate the database
python .\app\__init__.py -p
You can specify different parameters for which pages to extract data, for example:
python .\app\__init__.py -p -sp 5 -ep 10
Where -sp
is the start page and -ep
is the end page
Use the following command for a list of all commands:
python .\app\__init__.py --help