Book Recommendation System is a machine learning project that suggests books to users based on Popularity-Based Filtering and Content-Based Filtering.
It allows users to discover trending books and also find books similar to the ones they love β making reading choices smarter and more personalized.
This project uses the Books Dataset from Kaggle:
π Kaggle Dataset - Book Recommendation Dataset
It includes:
- Users (user IDs, demographics)
- Books (title, author, publisher, etc.)
- Ratings (explicit/implicit feedback)
Watch the demo of Book Recommendation System in action:
Book.Recommendation.System.mp4
-
β Popularity-Based Recommendations
β Suggests top-rated and trending books based on user ratings. -
π Content-Based Recommendations
β Recommends books similar to a chosen one using author, genre, and metadata. -
π§ Hybrid Approach
β Combines popularity and content similarity for better results. -
π Interactive Web App
β Simple and user-friendly interface built with Flask.
-
Popularity-Based Filtering:
- Aggregates ratings and calculates weighted score.
- Displays the most popular books across the dataset.
-
Content-Based Filtering:
- Computes cosine similarity between book descriptions.
- Finds books with high similarity scores to the input.
-
Pre-processed Data:
- Uses
.pklfiles (saved models) for faster predictions.
- Uses
git clone https://github.com/Arpit-Padmani/Book-Recommadation-System.git
cd book-recommendation-system-
Books.csv β Contains book details.
-
Ratings.csv β Contains user ratings.
-
Users.csv β User details (for dataset reference).
-
app.py β Flask application entry point.
-
books-recommandation-system.ipynb / news.ipynb β Jupyter notebooks for model building & experimentation.
-
.pkl files β Precomputed models and data:
books.pklβ Processed books datapopular.pklβ Popularity-based recommendationspt.pklβ Pivot table matrixsimilarity_scores.pklβ Precomputed similarity scores
-
templates/ (HTML templates for Flask UI):
index.htmlβ Home page (search or landing page)recommend.htmlβ Displays recommended books
Run the Flask app:
python app.pyThen open your browser at:
http://127.0.0.1:5000/
- Programming Language: Python
- Data Handling: Pandas, NumPy
- Machine Learning: Scikit-Learn, Cosine Similarity
- Web Framework: Flask
- Visualization: Matplotlib, Seaborn
- Notebook Experiments: Jupyter
- If you like Harry Potter and the Sorcererβs Stone β Get recommendations like Percy Jackson or The Hobbit.
- If you browse trending β See books like The Da Vinci Code or The Alchemist.
Dependencies are listed in requirements.txt:
Flask==2.3.2
pandas==2.0.3
numpy==1.24.3
scikit-learn==1.3.0
scipy==1.11.1
matplotlib==3.7.2
seaborn==0.12.2
joblib==1.3.1
notebook==7.0.2Install them with:
pip install -r requirements.txtDeveloped by Arpit Padmani πΌ LinkedIn