This is a Movie Recommendation System that suggests similar movies based on content similarity. It uses Natural Language Processing (NLP) and cosine similarity to find movies similar to the one selected by the user.
- Recommends top 5 similar movies based on content analysis.
- Uses cosine similarity to measure movie similarity.
- Fetches movie posters using the OMDb API.
- Provides an interactive user interface using Streamlit.
- Python
- Pandas
- NumPy
- Scikit-learn
- NLTK (Natural Language Toolkit)
- Streamlit (for UI)
- OMDb API (for fetching posters)
git clone https://github.com/purva-8/Movie-Recommendation-System.git
cd Movie-Recommendation-Systempip install -r requirements.txtExecute main.py to generate the necessary files (movies.pkl and similarity.pkl).
python main.pyOnce the preprocessing is done, start the recommendation system:
streamlit run app.py- Merges the movies and credits datasets.
- Extracts important features (genres, keywords, cast, crew, overview).
- Cleans and processes text (removes spaces, lowercase, and stems words).
- Converts text data into numerical vectors using CountVectorizer.
- Computes cosine similarity between movie vectors.
- Saves processed data into
movies.pklandsimilarity.pkl.
- Loads the movies and similarity matrix.
- Provides a dropdown to select a movie.
- Computes top 5 similar movies.
- Fetches and displays movie posters using the OMDb API.
When a user selects "Iron Man", the system may recommend:
- The Avengers
- Iron Man 2
- Captain America: Civil War
- Avengers: Age of Ultron
- Thor
Each recommended movie is displayed along with its poster.