A smart recommendation engine that suggests similar movies based on a selected title using collaborative filtering (SVD). Built with Streamlit, it fetches posters, displays release year, and visualizes ratings using stars — all powered by the TMDB API.
This app enables users to select a movie and receive top 10 recommendations based on a similarity matrix trained on Netflix movie ratings. It uses:
- SVD (Singular Value Decomposition) for latent factor modeling
- Cosine similarity for identifying similar movies
- TMDB API for fetching posters and metadata
- Streamlit for an interactive UI
📦 Movie-Recommender/
├── app.py # Streamlit app
├── svd_model.pkl # Trained model with similarity matrix
├── movie_titles.csv # Metadata with Movie_Id, Title, Year
├── netflix_ratings.csv # Ratings (0–1 format)
├── requirements.txt # Python dependencies
├── .streamlit/
│ └── secrets.toml # API key storage (TMDB)
└── screenshots/
└── sample_ui.png # UI Preview
git clone https://github.com/PradeepJami18/movie-recommender.git
cd movie-recommender
python -m venv venv
venv\Scripts\activate # Windows
# source venv/bin/activate # macOS/Linux
pip install -r requirements.txt
Create the following file:
.movie-recommender/
└── .streamlit/
└── secrets.toml
Inside secrets.toml
, paste your TMDB API key like this:
TMDB_API_KEY = "your_tmdb_api_key_here"
streamlit run app.py
Then open http://localhost:8501 in your browser.
- 🎞️ Poster support via TMDB API
- 🌟 Ratings visualized as 5-star bars (0–1 scaled to 1–5)
- 📅 Movie release year display
- ⚡ Fast response with precomputed similarity matrix
- 🧊 Clean & responsive Streamlit UI
streamlit
pandas
numpy
scikit-learn
tmdbsimple
Install using:
pip install -r requirements.txt
You can deploy this app on Streamlit Community Cloud.
- Push your code to a GitHub repo.
- Go to Streamlit Cloud and connect your repo.
- Add your TMDB API key in App Settings > Secrets like this:
TMDB_API_KEY = "your_tmdb_api_key"
Jami Pradeep
📧 pradeepjami18@gmail.com
🔗 LinkedIn
📁 GitHub
This project is licensed under the MIT License.
See the LICENSE file for more information.
- Add genre-based filtering
- Incorporate user authentication
- Add rating and review submission from users
- Real-time retraining with feedback
💡 If you like this project, feel free to ⭐ it on GitHub!