interview task: break down a notebook into a portable, collaborative & easily deployable project.

The initial project is a recommendation tool that is ready to be deployed.

Taking this example, we would like to deploy it server-side on our PostgreSQL server by embedding it into a simple python function.

To deploy it according to the best practice we'll break it down into a nbdev project. This will allow us to continue developing the core components of our recommendations with collaborative jupyter notebooks :

Install

pip install -e .

How to use

Getting the recommendation for user_id 999 with the dot_product_similarity

from moviesrec.features_store import movies , ratings , users , genre_and_title_cols , genre_cols
from moviesrec.similarities import dot_product_similarity
from moviesrec.recommendation import get_recommendations
get_recommendations(user_id=999 , similarity = dot_product_similarity(movies[genre_cols]))
movie_id title similarity
0 166 First Knight 2.0
2 1451 Smilla's Sense of Snow 2.0
3 503 Perfect World, A 2.0
4 3197 Man Bites Dog (C'est arriv� pr�s de chez vous) 2.0
5 1458 Devil's Own, The 2.0