This is a repository for Artificial Intelligence Lab(CSE 338) project of Group 09.
A music recommendation system based on facial emotion recognition. Mainly this project is done using deep learning. In terms of building website, Javascript(React) and Python(Flask) frameworks are used for frontend and backend respectively. Spotify API is used for whole music purpose.
Following instructions are only for windows operating system.
- We are using Spotify API. To use it you need to create your own spotify developer account here
- After creating an account, you need a create a project in it.
- The project will have it's own client_id and client_secret. Which will be used in the backend.
- You also need to specify the redirect_url in settings->add whitelist
- For more clear information you could check the official guide
*** Please use your own client_id,client_secret and redirect_url from the API section and replace them inside of server.py
file ***
- The backend is built with flask. So make sure you have python installed in your system. The latest version doesn't work with tensorflow. We recommend version 3.10.10. You should install the 64-bit version. You can download this from link.
- Open command prompt and cd to the backend directory of this project.
cd <path\to\backend>
. - Create a python virtual environment with this command:
python -m venv venv
. - Activate the virtual environment.
<path\to\backend>\venv\Scripts\activate
. - You need to install the following packages with:
pip install <package_name>
- flask
- flask_cors
- tensorflow
- numpy
- pillow
- spotipy
- scikit-learn
- Run the command
python server.py
to start the server on port 5000(default). - **Important. To be able to fetch songs from spotify api, the server needs an api access token. Open a new brower tab and go to "localhost:5000/api/auth". This will prompt the user to sign in with their spotify account. After successful sign in, the server will receive the access token. You should always perform this step before opening up the frontend.
- Fontend is developed using React JS(version : ^18.2.0 ) . You must have (Node JS) in your system .
- Open the terminal and paste it "cd/Tune.Expo-Music-recommender-App"
- Then run "npm install"
- Make sure backend is runnug then run "npm start" for starting the frontend
- Amir Hamza
Reg No: 2018331011 - MD. Abdul Kadir
Reg No: 2018331055 - Nafis Fuad Abir
Reg No: 2018331087 - Ahmadul Hasan
Reg No: 2018331109 - Muhit Mahmud
Reg No: 2018331113
Assistant Professor,
Department of CSE, SUST