An open API service indexing awesome lists of open source software.

https://github.com/vsancnaj/hybrid-recommendation-system

A hybrid recommendation system combining Item-Based Collaborative Filtering and Content-Based Filtering to suggest skincare products based on user preferences, product ingredients, and ratings. Features a Flask API and an interactive Streamlit Web App for personalized recommendations.
https://github.com/vsancnaj/hybrid-recommendation-system

collaborative-filtering content-based-filtering ecommerce flask-api machine-learning nlp recommendation-system sephora skincare streamlit

Last synced: about 1 month ago
JSON representation

A hybrid recommendation system combining Item-Based Collaborative Filtering and Content-Based Filtering to suggest skincare products based on user preferences, product ingredients, and ratings. Features a Flask API and an interactive Streamlit Web App for personalized recommendations.

Awesome Lists containing this project

README

        

# ๐Ÿงด Sephora Skincare Recommender

## ๐Ÿ“Œ Overview
A **Hybrid Recommendation System** for **Sephora skincare products**, combining:

1๏ธโƒฃ **Item-Based Collaborative Filtering** โ€“ Recommends products based on user ratings.
2๏ธโƒฃ **Content-Based Filtering** โ€“ Recommends products based on ingredients, categories, and highlights.

## ๐ŸŽฏ Purpose
- Help users find skincare products tailored to their **preferences, skin type, and concerns**.
- Provide **personalized recommendations** using **machine learning & NLP**.

## ๐Ÿš€ Features
โœ… **Hybrid Recommendation Model** (Item-Based CF + Content-Based Filtering)
โœ… **Flask API** โ€“ Serves recommendations dynamically
โœ… **Streamlit Web App** โ€“ User-friendly interface to explore recommendations

## ๐Ÿ“ฆ Structure
```
โ”œโ”€โ”€ ๐Ÿ“‚ data/ # Contains raw dataset files (ignored in Git)
โ”‚ โ”œโ”€โ”€ product_info.csv # Product metadata (ID, name, brand, ingredients, categories, price, etc.)
โ”‚ โ”œโ”€โ”€ reviews_0-250.csv # User reviews (ratings, skin type, feedback, etc.)
โ”‚ โ”œโ”€โ”€ ... # Other review datasets (split for large-scale handling)
โ”‚
โ”œโ”€โ”€ ๐Ÿ“‚ metadata/ # Stores processed data files
โ”‚ โ”œโ”€โ”€ products.csv # Cleaned & processed product metadata
โ”‚ โ”œโ”€โ”€ hybrid_similarity.pkl # Precomputed similarity matrix for recommendations
โ”‚
โ”œโ”€โ”€ ๐Ÿ“‚ skincare/ # Virtual environment (ignored in Git)
โ”‚
โ”œโ”€โ”€ api.py # Flask API for serving recommendations
โ”œโ”€โ”€ app.py # Streamlit Web App interface
โ”œโ”€โ”€ model.ipynb # Jupyter Notebook for training & evaluating models
โ”œโ”€โ”€ requirements.txt # Dependencies for installing the project
โ”œโ”€โ”€ .gitignore # Excludes unnecessary files (datasets, env, cache)
โ”œโ”€โ”€ README.md # Project documentation (this file)
```

## ๐Ÿ“‚ Dataset
- **Product Data:** Contains product ID, brand, ingredients, categories, price, and highlights.
- **Reviews Data:** User ratings, reviews, and skincare attributes (skin type, concerns).
### **1๏ธโƒฃ Download the Dataset**
1. Go to the [Sephora Skincare Reviews Dataset on Kaggle](https://www.kaggle.com/datasets/nadyinky/sephora-products-and-skincare-reviews/data)
2. Click Download and extract the ZIP file.

### **2๏ธโƒฃ Move Files to data/ Directory**
- After extraction, place the dataset files inside the data/ folder:
```
โ”œโ”€โ”€ data/
โ”‚ โ”œโ”€โ”€ product_info.csv
โ”‚ โ”œโ”€โ”€ reviews_0-250.csv
โ”‚ โ”œโ”€โ”€ reviews_250-500.csv
โ”‚ โ”œโ”€โ”€ reviews_500-750.csv
โ”‚ โ”œโ”€โ”€ reviews_750-1250.csv
โ”‚ โ”œโ”€โ”€ reviews_1250-end.csv
```

## ๐Ÿ› ๏ธ Installation & Setup
### **1๏ธโƒฃ Install Dependencies**
```bash
pip install -r requirements.txt
```

### **2๏ธโƒฃ Run the Flask API**
```bash
python api.py
```
- API will be available at: http://127.0.0.1:5000/recommend?product_id=P12345&num_recommendations=5

### **3๏ธโƒฃ Run the Streamlit Web App**
```bash
streamlit run app.py
```
- Open in browser: http://localhost:8501

## **๐Ÿ“Œ How It Works**
1. Users select a Sephora skincare product from the web app.
2. The model generates recommendations using a combination of product similarity (content-based) and user ratings (collaborative filtering).
3. Users receive recommendations with product details (brand, price, and rating).

## **๐Ÿ› ๏ธ Future Improvements**
- Improve recommendations using sentiment analysis on user reviews.
- Personalize results further based on skin type & concerns.
- Deploy API & Web App on AWS/Heroku for public access.