Skip to content

🎬 An AI-powered movie recommender system that suggests similar movies based on the user-selected movie. It provides recommendations along with movie posters!

License

Notifications You must be signed in to change notification settings

hk-kumawat/Movie-Recommender-System

Repository files navigation

🎬 Movie Recommender System 📽️

132905471-3ef27af4-ecc6-44bf-a47c-5ccf2250410c

Overview

The Movie Recommender System leverages machine learning and natural language processing to suggest movies similar to a user’s selected movie. Using metadata from movies such as genres, keywords, cast, and crew, it provides recommendations based on similarity. This project is ideal for applications like personalized streaming services and movie discovery platforms.

Live Demo

Try out the Handwritten Digit Recognizer! 👉🏻 Experience It! 🌟


Below is a preview of the Movie Recommender System in action. Enter a movie name to see similar movie suggestions! 👇🏻

movie


Table of Contents

  1. Features
  2. Dataset
  3. Data Preprocessing
  4. Model Training
  5. Installation
  6. Usage
  7. Technologies Used
  8. Results
  9. Conclusion
  10. License
  11. Contact

Features🌟

  • Real-time movie recommendations based on a user-selected movie.
  • Integrates with The Movie Database (TMDb) API to fetch trending movies and posters.
  • Provides an intuitive interface built with Streamlit for an engaging user experience.
  • Optimized for fast processing and real-time recommendations, even with large datasets.

Dataset📊

  • TMDb 5000 Movie Dataset: This dataset contains detailed metadata for 5,000 movies, including information like genres, cast, crew, and keywords. It serves as the primary data source for generating movie recommendations based on content similarity.
  • Data Processing: The dataset is transformed into a similarity matrix that compares movies based on their metadata, enabling the system to find and suggest movies similar to the one selected by the user.

Data Preprocessing🛠

  1. Data Cleaning: Null values are removed, and duplicate entries are handled.
  2. Feature Extraction: The following features are extracted for each movie:
    • Genres
    • Keywords
    • Cast (top 3 cast members)
    • Crew (director only)
  3. Text Preprocessing: Features are merged into a single "tags" column, with all text converted to lowercase for uniformity.
  4. Stemming: PorterStemmer is used to reduce words to their root forms, optimizing similarity matching.

Model Training🧠

  • Text Vectorization: A CountVectorizer is used to transform text data into vectors, with a maximum of 5,000 features.
  • Cosine Similarity: Cosine similarity is computed to create a similarity matrix, measuring the closeness of each movie pair.
  • Similarity Search: The model retrieves the top 5 most similar movies for the selected title.

Final Model Artifacts:

  • movie_list.pkl: Contains movie data for the recommendation.
  • similarity.pkl: Stores the cosine similarity matrix for recommendations.

Installation🛠

  1. Clone the repository:

    https://github.com/hk-kumawat/Movie-Recommender-System.git
  2. Install dependencies:

    pip install -r requirements.txt

Usage🚀

  1. Run the Streamlit App:

    streamlit run app.py
  2. Selecting a Movie: Choose a movie from the dropdown menu to view recommendations.

  3. Trending Section: The app also displays the top 5 trending movies based on TMDb’s API.


Technologies Used💻

  • Programming Language: Python
  • Libraries:
    • pandas
    • numpy
    • scikit-learn
    • streamlit
    • requests
    • nltk (for stemming)
  • API: TMDb API for fetching trending movies and movie posters

Results🏆

The Movie Recommender System effectively recommends movies with similar features, with quick response times and a user-friendly interface. The project showcases how machine learning and NLP can be applied to content-based recommendation systems.


Conclusion📚

The Movie Recommender System showcases how machine learning can enhance user experiences through intelligent recommendations. By utilizing metadata like genres, keywords, cast, and crew, combined with cosine similarity, the system effectively suggests movies similar to a user’s choice. This project exemplifies the potential of recommendation engines in various applications, particularly in content discovery for entertainment platforms.

With room for further enhancements, such as refining the recommendation logic or expanding the dataset, this system provides a solid foundation for personalized, data-driven movie suggestions. It serves as a practical application of machine learning concepts and highlights the role of content-based filtering in building engaging and user-centric platforms.


License📝

This project is licensed under the MIT License - see the LICENSE file for details.


Contact

📬 Get in Touch!

I’d love to connect and discuss further:

  • GitHub 💻 — Explore my projects and contributions.
  • LinkedIn 🌐 — Let’s connect professionally.
  • Email 📧 — Send me an email for discussions and queries.


Thanks for checking out this movie magic! Enjoy discovering your next favorite film!🎬🔍

"Because every movie deserves a fan, and every fan deserves the right movie." - Anonymous

About

🎬 An AI-powered movie recommender system that suggests similar movies based on the user-selected movie. It provides recommendations along with movie posters!

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published