This is a content-based movie recommender system built using Python, Streamlit, and scikit-learn. It suggests similar movies based on the one you select, using cosine similarity on movie metadata features.
- Recommend top 5 movies similar to a selected movie
- Movie posters fetched via TMDb API
- Clean and interactive UI with Streamlit
- Lightweight and easy to deploy.
-
Python 3.8+
-
Streamlit
-
Pandas
-
numpy
-
Scikit-learn
-
Requests
-
Pickle (for precomputed similarity & movie data)
The Movie Database (TMDb) in accordance with their terms of use.
Download the (Dataset)[https://www.kaggle.com/datasets/tmdb/tmdb-movie-metadata]
Coming soon on Streamlit Cloud or Render!
git clone https://github.com/your-username/movie-recommender.git
cd movie-recommenderpython -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activatepip install -r requirements.txtCreate a file called .env (or update directly in the code):
TMDB_API_KEY=your_api_key_here
Or edit this line in app.py:
url = f"https://api.themoviedb.org/3/movie/{movie_id}?api_key=YOUR_KEY&language=en-US"streamlit run app.py├── app.py # Main Streamlit app
├── Model/
│ ├── movie_list.pkl # Movie metadata
│ ├── similarity.pkl # Precomputed similarity matrix
├── requirements.txt
└── README.md
- Load movie metadata and similarity matrix
- Select a movie from the dropdown
- Recommend top 5 similar movies based on cosine similarity
- Fetch and display posters via TMDb API
- Include genre and rating filters
- Add collaborative filtering model
- Deploy on Streamlit Cloud or Render
- Integreate AI to explain each movie and how it relates
Feel free to fork this repo, open issues, or submit pull requests.