A Modern Content-Based Recommender App Built with Streamlit + TMDB API
This Movie Recommendation System uses content-based filtering to recommend similar movies based on metadata and cosine similarity. It integrates with the TMDB API to fetch high-quality posters, providing a clean and modern UI built using Streamlit.
The project is lightweight, fast, and ready for deployment.
✨ Content-based filtering using cosine similarity 🎞️ Real-time posters fetched via TMDB API ⚡ Optimized response time using Session-based requests 🎨 Sleek Streamlit UI with responsive layout 📦 Pickle-based model loading (lightweight & quick) 🔍 Accurate recommendations from metadata vectors
| Component | Technology |
|---|---|
| Frontend/UI | Streamlit |
| Backend Logic | Python |
| Data Handling | Pandas, Pickle |
| API | TMDB (The Movie Database) |
| Similarity Model | Cosine Similarity |
Movie-Recommendation/
│── app.py
│── movie_list.pkl
│── similarity.pkl
│── requirements.txt
│── README.mdgit clone https://github.com/Asphane/Movie-Recommendation.git
cd Movie-Recommendationpython3 -m venv venv
source venv/bin/activate # Mac/Linux
venv\Scripts\activate # Windowspip install -r requirements.txtInside app.py, replace:
"Authorization": "Bearer YOUR_TOKEN_HERE"with your actual TMDB Read Access Token (v4).
streamlit run app.pyApp runs at: 👉 http://localhost:8501
Reads movie_list.pkl which contains movie vectors & metadata.
Loads pre-computed cosine similarity from similarity.pkl.
Finds top N most similar movies based on the selected movie.
Uses TMDB API to fetch high-resolution posters.
Renders posters and titles in a clean grid layout.
(Add your screenshot images here) Example:
<p align="center">
<img src="assets/app_preview.png" width="80%">
</p>- Invalid or expired TMDB token
- Missing "Bearer " prefix
- API rate limit possibly hit
git init
git remote add origin https://github.com/Asphane/Movie-Recommendation.gitContributions are welcome! You can help improve:
- UI Design
- Advanced recommendation algorithms
- Model training
- Deployments (Streamlit Cloud / Render / HuggingFace Spaces)
Feel free to submit a pull request.
Licensed under the MIT License.
If this project helped you, please ⭐ the repo! It motivates me to build more cool ML apps.