A Content-Based Movie Recommendation System built with Python, Scikit-learn, and Streamlit. The application recommends movies similar to the one selected by the user using Cosine Similarity, while fetching movie posters dynamically from the TMDB API.
🔗 Streamlit App: Movie Recommendation System
- 🎥 Search from 5000+ movies
- 🤖 Content-based movie recommendations
- ⭐ Returns the Top 5 similar movies
- 🖼️ Fetches movie posters using the TMDB API
- ⚡ Parallel poster loading for faster performance
- ☁️ Deployed using Streamlit Community Cloud
- 🤗 Model files hosted on Hugging Face
- Python
- Streamlit
- Pandas
- NumPy
- Scikit-learn
- NLTK
- Requests
- TMDB API
- Hugging Face Hub
movie-recommendation-system/
│
├── app.py
├── movie_recommend_system.ipynb
├── requirements.txt
├── runtime.txt
├── README.md
├── .gitignore
└── .env (local only)
The recommendation system follows these steps:
- Load the TMDB Movies and Credits datasets.
- Merge both datasets.
- Select important features:
- Genres
- Keywords
- Cast
- Director
- Overview
- Clean and preprocess the data.
- Apply text stemming using PorterStemmer.
- Convert text into vectors using CountVectorizer.
- Compute movie similarity using Cosine Similarity.
- Recommend the top 5 similar movies.
- Fetch movie posters dynamically using the TMDB API.
TMDB Movies Dataset
│
▼
Merge Movies & Credits
│
▼
Feature Selection
(Genres, Cast, Director,
Keywords, Overview)
│
▼
Text Preprocessing
│
▼
Porter Stemming
│
▼
CountVectorizer
(max_features = 5000)
│
▼
Cosine Similarity Matrix
│
▼
Recommendation Engine
│
▼
Streamlit Web Application
- TMDB 5000 Movies Dataset
- TMDB 5000 Credits Dataset
Clone the repository
git clone https://github.com/Akhilesh-Mogaveer/movie-recommendation-system.gitMove into the project directory
cd movie-recommendation-systemCreate a virtual environment
python -m venv .venv
.venv\Scripts\activatepython3 -m venv .venv
source .venv/bin/activateInstall the dependencies
pip install -r requirements.txtCreate a .env file in the project root.
TMDB_API_KEY=YOUR_TMDB_API_KEYGet your free API key from:
https://developer.themoviedb.org/
streamlit run app.pyThe recommendation model files are hosted on Hugging Face and downloaded automatically when the application starts.
Repository:
https://huggingface.co/Akhileshh1/movie-recommendation-system
The notebook generates:
movies_dict.pklsimilarity.pkl
These files are used by the Streamlit application for fast recommendations.
- ⭐ Display IMDb/TMDB ratings
- 🎭 Genre filtering
- 📅 Release year filtering
- ❤️ Favorite movies feature
- 🔍 Search autocomplete
- 🌍 Multi-language support
- 🤖 Hybrid recommendation system
- 🎬 Movie trailers
Akhilesh
- 💼 LinkedIn: https://linkedin.com/in/akhilesh-1109ma
- 💻 GitHub: https://github.com/Akhilesh-Mogaveer
- TMDB for providing the movie dataset and API.
- Scikit-learn for machine learning utilities.
- Streamlit for rapid web application development.
- Hugging Face for hosting the model files.
If you found this project useful, please consider giving it a ⭐ on GitHub!
It helps others discover the project and supports future improvements.

