To set up the project, first install the required dependencies by running:
pip install -r requirements.txt
Next, initialize the Airflow database by running:
airflow db init
Create a new user by running:
airflow create user <USER_DETAIL>
Then, start the Airflow webserver on port 8080 with:
airflow webserver --port 8080
Start the Airflow scheduler with:
airflow scheduler
Move the dag.py
, ml_training_dag.py
, and config.py
to dags folder in airflow
To test the DAG, run:
airflow dags test is3107_spotify_dag <DATE>
airflow dags test is3107_ml_dag <DATE>
Replace <USER_DETAIL>
and <DATE>
with the appropriate values.
Download the BigQuery API file and put it in the same folder as app.py
To run the app, type the following command in your command prompt:
python app.py
The app includes a dashboard that allows you to analyze Spotify tracks.
Choose a song, and the app will provide a popularity prediction and song recommendation based on machine learning models.