
- Jupyter Notebook99.8%
- Python0.2%
A movie recommendation system built using Python and Streamlit library.

A content-based movie recommender using TF-IDF features and cosine similarity, with a Streamlit interface and the TMDB 5000 dataset.
From README.md in the repository.
A Content-Based Machine Learning System that recommends movies similar to your favorites.
This project is a Content-Based Recommendation System built using Python and Streamlit. It solves the problem of "choice paralysis" by analyzing metadata from the TMDB 5000 Movie Dataset to suggest movies that share narrative, thematic, or production similarities with a user's selection.
| ๐ Performance | ๐จ UX/UI | ๐ง Engineering |
|---|---|---|
| Instant Results: Generates 5 recommendations in milliseconds using pre-computed similarity matrices. |
Visual Posters: Fetches high-res movie posters dynamically via the TMDB API. |
Vectorization: Uses CountVectorizer to convert text data into numerical vectors. |
| Smart Filtering: Filters based on a combined logic of Cast, Crew, Keywords, and Genres. |
Responsive Design: Clean, mobile-friendly interface powered by Streamlit. |
Cosine Similarity: Computes the geometric distance between movie vectors to find matches. |
The engine uses Cosine Similarity to measure the distance between movies in a multi-dimensional space.
Credits and Movies datasets.tags column by concatenating:$$\text{Cosine Similarity}(A, B) = \frac{A \cdot B}{|A| |B|}$$
Below is the high-level data flow pipeline, from raw CSV ingestion to frontend display.
flowchart LR
subgraph Data Processing
A[Raw CSVs] -->|Pandas| B(Data Cleaning)
B -->|Feature Extraction| C{Tags Creation}
end
subgraph Model Building
C -->|CountVectorizer| D[Vector Space]
D -->|Cosine Similarity| E[Similarity Matrix]
E -->|Pickle Dump| F[(Model Files)]
end
subgraph Frontend
G[User Input] -->|Select Movie| H[Streamlit App]
H -->|Load .pkl| F
H -->|API Call| I[TMDB API]
I -->|Return Poster| H
H -->|Display| J[Recommendations]
end
โโโ movies_recommendation_system.ipynb # Jupyter notebook for data training
โโโ movies_rs.py # Main Streamlit application
โโโ tmdb_5000_credits.csv # Dataset 1: Credits
โโโ tmdb_5000_movies.csv # Dataset 2: Movies metadata
โโโ movies.pkl # Processed dataframe (generated)
โโโ similarity.pkl # Similarity matrix (generated)
โโโ requirements.txt # List of dependencies
โโโ README.md # Project documentation
Installation & Setup Follow these steps to set up the project locally.
cd movie-recommender
Install Dependencies Bash pip install -r requirements.txt
Generate the Models Note: Due to file size limits, the model files are not included in the repo. You must generate them.
Open movies_recommendation_system.ipynb in Jupyter Notebook.
Run all cells.
This will generate movies.pkl and similarity.pkl in your directory.
Built with โค๏ธ using Python and Streamlit
README.md in your project folder.https://github.com/Soham-o/movie-recommender.git with your actual repo URL.https://via.placeholder.com... links with the actual paths to your images..pkl files to a models/ folder if you want to match the structure in the readme, or update the text to match your current flat file structure.GitHub data synced 25 Oct 2026