This material is based on this Alura course.
The material from course is implemented using Jupyter Notebooks, but here I implement a variation using only python and a different project structure. The goal is to implement my own version of KNN to recommend movies to a user.
The data-source can be obtained here. The small dataset is included on this repository, but the full dataset must be downloaded separately.
-
pip install pandas pip install numpy pip install fastapi pip install "uvicorn[standard]"
There is two ways to run the code: (1) running the recommendations on the console and (2) using a FastAPI server.
(1)
python main.py
(2)
uvicorn main:app --reload
The
reload
option is used to reload the code when it changes and should be used only when developing.
For te API, the Documentation can be found at http://localhost:8000/docs.
- Start using mongodb to store the data and not in a csv file.
- Create workers to preprocess de data.
- Training with the complete dataset.