Production site: https://www.sound-drip.com/
There's a lot going on here, so we'll let you know where things are.
Top Level
data_collectionis a directory where we aggregated all the spotify song datamodel_notebooksis a directory where all current and former knn models are found. There is also a notebook where we tried DBSCANmodel_validationis a directory used to test out song outputs from our model for listening as part of the model validation stepFlask_Notebooksis our directory for notebooks used for staging production code prior to deploying changes to flaskspotipyis our directory where we explored the Spotify API extensively in preparation for API callsRDS-postgres/SOUNDDRIPis our sandbox for testing out new updates to our RDS-hosted postgrSQL tablesFlask_AWS/SOUNDDRIPis our production flask app
More information can be found on our notion doc: https://www.notion.so/For-Current-DS-145f105cd7a1459bbc955a97624ecc60
API INPUTS/OUTPUTS
Root endpoints utilized on local flask deployments
- Root are the local APIs
- SD DS Prod refers to the main one being consumed by the application
Information regarding the API calls made between front-end and DS can be found here: https://documenter.getpostman.com/view/10161796/SzRuYroD?version=latest#intro
Local Deployment
Environment manager documentation can be found here: https://packaging.python.org/guides/installing-using-pip-and-virtual-environments/
- Install pip's preferred virtual environment manager
python3 -m pip install --user virtualenv
- Access
Flask_AWS/SOUNDDRIP - Create environment, replacing
envwith your preferred environment name
python3 -m venv [environment name]
- Activate environment
source [environment name]/bin/activate
- Install all dependencies from the
requirements.txtfile located in the current directory
pip3 install -r requirements.txt
- Download all compressed file object dependencies from
S3in this directory
-
Copy following files to
./models:model5.joblibscalar3.joblibslider_model6.joblib
-
Place
song_id_array3.pklandgenres_array_2.pklin a newdatafolder after creating it under theSOUNDDRIPdirectory -
Create
env_vars.pywith the necessary database credentials under./misc/ -
Run the application
python3 application.py
-
NOTE: If you get an error that a particular package is missing even though you have confirmed it is installed, you will need to
pip installthose packages utilizing an optionaltargetargument:- You can find your virtual enviroment's target directory by accessing python3 shell within your virtual environment and running
sys.path
- You can find your virtual enviroment's target directory by accessing python3 shell within your virtual environment and running
pip install [package name] --target [target directory]