This project implements a personalized movie recommendation system inspired by Netflix. It combines collaborative filtering (CF) using K-Nearest Neighbors (KNN) with latent features and content-based filtering (CBF) using Singular Value Decomposition (SVD). The system is deployed using Docker and Google Cloud Run for scalable and efficient serving.
- Collaborative Filtering (CF): Utilizes KNN with latent features to recommend movies based on user-item interactions.
- Content-Based Filtering (CBF): Employs SVD to suggest movies similar to those a user has previously liked, based on movie metadata.
- Hybrid Approach: Integrates CF and CBF to provide more accurate and diverse recommendations.
- Deployment: The model is containerized using Docker and deployed on Google Cloud Run for seamless scaling and accessibility.
- Python: Programming language for data processing and model development.
- Pandas: Data manipulation and analysis.
- Scikit-learn: Machine learning algorithms and utilities.
- Flask: Web framework for serving the recommendation model.
- Streamlit: Interactive web interface for user interaction.
- Docker: Containerization of the application.
- Google Cloud Run: Serverless platform for deploying the containerized application.
├── deployment/ # Docker and deployment scripts
├── training/ # Model training scripts
├── main.ipynb # Jupyter notebook for EDA and model training
├── dataset.txt # Sample dataset
├── dataset_summary.txt # Summary of the dataset
├── live-demo.txt # Instructions for accessing the live demo
└── README.md # Project documentation
- Clone the Repository:
git clone https://github.com/aydiegithub/netflix-movie-recommendation-system-eda-ml-training.git
cd netflix-movie-recommendation-system-eda-ml-training
-
Create a Virtual Environment:
python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate
-
Install Dependencies:
pip install -r requirements.txt
-
Set TMDB API Key:
Obtain an API key from TMDB and set it as an environment variable:
export TMDB_API_KEY='your_api_key' # On Windows: set TMDB_API_KEY=your_api_key
^Provides an interactive web interface for movie recommendations.
streamlit run app/streamlit_app.py
- ^Access the app at
http://localhost:8501/
.
^Offers a web application using Flask framework.
python app/main.py
- ^Access the app at
http://localhost:5000/
.
-
Build Docker Image:
docker build -t netflix-recommender .
-
Deploy to Google Cloud Run:
Follow Google Cloud Run deployment guide to deploy the Docker image.
-
Set Environment Variables:
Ensure
TMDB_API_KEY
is set in the Cloud Run service settings. -
Access the Application:
Once deployed, access the application via the URL provided by Google Cloud Run.
- ^[TMDB API for movie data and images.]({"attribution":{"attributableIndex":"2566-9"}})
- ^[Surprise Library for building the recommendation engine.]({"attribution":{"attributableIndex":"2566-10"}})
- ^[Streamlit and Flask for web interfaces.]({"attribution":{"attributableIndex":"2566-11"}})
Aditya Dinesh K
Founder of Aydie’s Avenue
📧 business@aydie.in / aditya@aydie.in
📞 +91 9036 4694 92
🌐 aydie.in