A music recommendation REST API which makes a machine learning algorithm work with the Django REST Framework

Overview

music-recommender-rest-api

A music recommendation REST API which makes a machine learning algorithm work with the Django REST Framework

alt text

How it works

The REST API has a simple operational flow which goes like so :

  1. User signs up at the /sign-up endpoint

  2. User logs in using Django REST Framework's basic authentication via the /login endpoint

  3. After successful authentication user can then navigate to the /recommend endpoint

Deeper Intuition

The code I have designed is connected directly to a packaged machine learning model, a user signs up by providing data such as gender, age, name etc. Once a sign up is successful then the user can login to use the /recommend endpoint to get recommendations on music that best fits the user's age/gender. Music Albums are stored in an SQLite database and are picked then displayed to user at the /recommend endpoint. Now the question is what's the process look like in simple steps? :

  1. User signs up and provides info like gender, age, name, etc..

  2. Once user logs in and navigates to /recommend endpoint, the back end will send that authenticated user's age & gender to the packaged ML model for evaluation / to get a prediction on what genre of music would be best for the user's age/gender type.

  3. once a genre is predicted by ML model the result is sent to a queryset for filtering thus returning music from the database the REST API is connected to which has the genre that was predicted in the first place.

Setup

  1. run the command pip3 install -r requirements.txt to install required libraries

  2. setup migrations by running command python3 manage.py makemigrations accounts and python3 manage.py makemigrations api

  3. finally apply migrations by running command python3 manage.py migrate

  4. create a super user for accessing /admin by running command python3 manage.py createsuperuser

  5. after that just fill the database with some albums of different genres from the admin panel

  6. and you are Done!

Owner
The Reaper
Back end developer who is madly in love with python...
The Reaper
Django + NextJS + Tailwind Boilerplate

django + NextJS + Tailwind Boilerplate About A Django project boilerplate/templa

Shayan Debroy 3 Mar 11, 2022
A simple demonstration of integrating a sentiment analysis tool in a django project

sentiment-analysis A simple demonstration of integrating a sentiment analysis tool in a django project (watch the video .mp4) To run this project : pi

2 Oct 16, 2021
This is raw connection between redis server and django python app

Django_Redis This repository contains the code for this blogpost. Running the Application Clone the repository git clone https://github.com/xxl4tomxu9

Tom Xu 1 Sep 15, 2022
xsendfile etc wrapper

Django Sendfile This is a wrapper around web-server specific methods for sending files to web clients. This is useful when Django needs to check permi

John Montgomery 476 Dec 01, 2022
Reusable, generic mixins for Django

django-braces Mixins for Django's class-based views. Documentation Read The Docs Installation Install from PyPI with pip: pip install django-braces Bu

Brack3t 1.9k Jan 05, 2023
Run Django tests with testcontainers.

django-rdtwt (Run Django Tests With Testcontainers) This targets users who wish to forget setting up a database for tests. There's no manually startin

2 Jan 09, 2022
A helper for organizing Django project settings by relying on well established programming patterns.

django-configurations django-configurations eases Django project configuration by relying on the composability of Python classes. It extends the notio

Jazzband 953 Dec 29, 2022
Django channels basic chat

Django channels basic chat

Dennis Ivy 41 Dec 24, 2022
Bleach is an allowed-list-based HTML sanitizing library that escapes or strips markup and attributes

Bleach Bleach is an allowed-list-based HTML sanitizing library that escapes or strips markup and attributes. Bleach can also linkify text safely, appl

Mozilla 2.5k Dec 29, 2022
Example project demonstrating using Django’s test runner with Coverage.py

Example project demonstrating using Django’s test runner with Coverage.py Set up with: python -m venv --prompt . venv source venv/bin/activate python

Adam Johnson 5 Nov 29, 2021
🗂️ 🔍 Geospatial Data Management and Search API - Django Apps

Geospatial Data API in Django Resonant GeoData (RGD) is a series of Django applications well suited for cataloging and searching annotated geospatial

Resonant GeoData 53 Nov 01, 2022
Awesome Django Blog App

Awesome-Django-Blog-App Made with love django as the backend and Bootstrap as the frontend ! i hope that can help !! Project Title Django provides mul

ANAS NABIL 2 Feb 08, 2022
A prettier way to see Django requests while developing

A prettier way to see Django requests while developing

Adam Hill 35 Dec 02, 2022
Django Livre Bank

Django Livre Bank Projeto final da academia Construdelas. API de um banco fictício com clientes, contas e transações. Integrantes da equipe Bárbara Sa

Cecília Costa 3 Dec 22, 2021
Advanced school management system written in Django :)

Advanced school management system written in Django :) ⚙️ Config the project First you should make venv for this project. So in the main root of proje

AminAli Mazarian 72 Dec 05, 2022
A simple djagno music website.

Mrock A simple djagno music website. I used this template and I translated it to eng. Also some changes commited. My Live Domo : https://mrock.pythona

Hesam N 1 Nov 30, 2021
Docker django app

Hmmmmm... What I should write here? Maybe "Hello World". Hello World Build Docker compose: sudo docker-compose build Run Docker compose: sudo docker-

Andrew 0 Nov 10, 2022
GameStop clone with Django

GameStop clone with Django This is my side project with GameStop clone Author: HackerApe GitHub Profile: View Profile LinkedIn Profile: View Profile

Dmitriy Shin 2 Dec 26, 2021
Realtime data read and write without page refresh using Ajax in Django.

Realtime read-write with AJAX Hey,this is the basic implementation type of ajax realtime read write from the database. where you can insert or view re

Mehedi Hasan 3 Dec 13, 2022
Twitter-clone using Django (DRF) + VueJS

Twitter Clone work in progress 🚧 A Twitter clone project Table Of Contents About the Project Built With Getting Started Running project License Autho

Ahmad Alwi 8 Sep 08, 2022