Music recommender backend
To run the API you need to follow these steps:
- Run
python3 -m venv .venv
to create a virtual environment - Run
source ./.venv/bin/activate
to activate the environment - Run
python3 -m pip install -r requirements.txt
- Copy the
dist.env
into a new.env
file - Create a spotify developer project with the following redirect URL:
http://localhost:8080/callback
- Copy the credentials into the
.env
file - Create an OpenAI account and copy the API key into the .env file
- Login with spotify following the steps when you run
python3 login.py
(Only need to run this script the first time) - If the login is successful you will be able to run
docker-compose up -d --build
- You can make a
POST
request tohttp://localhost:8080/recomend
when the container is running to get the recomendations. The format of the request body follows theRequestModel
defined insrc/models/base.py