Skip to content

Aaditthesmart/Movie-Recommender-System

Repository files navigation

🎬 Movie Recommender System

A Content-Based Movie Recommender System built using Machine Learning, NLP, and Streamlit.

This project recommends movies based on similarity of genres, keywords, cast, and crew using Bag of Words and Cosine Similarity.


🚀 Demo

  1. Select a movie from the dropdown
  2. Click Show Recommendation
  3. Get top 5 similar movies with posters

🧠 How It Works

1️⃣ Data Preprocessing

  • Converted JSON-like strings using ast.literal_eval
  • Extracted genres, keywords, cast, and crew
  • Selected top 3 actors
  • Removed spaces from multi-word names
  • Combined features into a single tags column

2️⃣ Text Vectorization

  • Used CountVectorizer
  • Removed English stopwords
  • Limited features to top 5000 words
  • Applied stemming using PorterStemmer

3️⃣ Similarity Calculation

  • Generated vectors for each movie
  • Computed Cosine Similarity
  • Built a similarity matrix to compare movies

4️⃣ Deployment

  • Saved processed data using pickle
  • Built interactive UI using Streamlit
  • Integrated TMDB API to fetch movie posters

🛠️ Tech Stack

  • Python
  • Pandas
  • NumPy
  • Scikit-learn
  • NLTK
  • Streamlit
  • TMDB API
  • Pickle

📂 Project Structure

├── app.py
├── movie_list.pkl
├── similarity.pkl
├── requirements.txt
├── README.md

📦 Installation

Clone the repository:

git clone https://github.com/your-username/movie-recommender.git
cd movie-recommender

Install dependencies:

pip install -r requirements.txt

Run the app:

streamlit run app.py

🔑 TMDB API Setup

Replace the API key in app.py:

api_key = "YOUR_API_KEY"

Get a free API key from:
https://www.themoviedb.org/


📊 Core Concept

This system uses:

  • Bag of Words model
  • Cosine Similarity
  • Content-Based Filtering

It recommends movies based on similar content, not user behavior.


⚡ Future Improvements

  • Use TF-IDF instead of CountVectorizer
  • Implement collaborative filtering
  • Use FAISS for scalable similarity search
  • Deploy on cloud (Streamlit Cloud / AWS)
  • Add movie overview and ratings

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors