This is a book recommender system which uses the unsupervised learning algorithm - Nearest Neighnours to predict next book to read
Steps to run it locally
- git clone the repository
https://github.com/pratham-saraf/book-recommender.git
- Download the Data Files
- Move the downloaded Data files inside
data
folder which should be created insidemodel
folder - Folder structure would look like
.
├── app.py
├── model
│ ├── data
│ │ ├── book_id_map.csv
│ │ ├── recommedation_model.sav
│ │ ├── search_final.json
│ │ └── sparse_matrix.npz
│ ├── recommender.py
│ └── search.py
├── README.md
├── requirements.txt
├── run
├── static
│ ├── dashboard.js
│ ├── find.css
│ ├── find.js
│ ├── images
│ │ ├── dislike.svg
│ │ └── like.svg
│ ├── nav.css
│ ├── recommendation.js
│ ├── signin.css
│ └── starter-template.css
└── templates
├── dashboard.html
├── find.html
├── index.html
├── layout.html
├── login.html
├── recommend.html
└── signup.html
- Run the command to create the virtual env and source it
cd book-recommender
python3 -m venv env
source env/bin/activate
- To install the python dependencies
pip install -r requirements.txt
- Create a .env file which contains
SECRET_KEY="A random password string for the flask"
MONGO_DB = "Mongo-DB-connection-URI"
- The mongodb cluster should have two collections named
└── Cluster
├── user-book-data
└── users
- Give run permissions to the run file and execute it
chmod +x run
./run