Skip to content

VijayKandpal001/MovieRecommender

Repository files navigation

Movie Recommender System 🎬

A content-based movie recommendation system that suggests similar movies based on your selection. The system uses natural language processing and machine learning techniques to analyze movie features and provide personalized recommendations.

🌟 Features

  • Interactive web interface built with Streamlit
  • Movie recommendations based on content similarity
  • Movie poster display for visual reference
  • User-friendly dropdown selection
  • Real-time movie poster fetching using TMDB API

🛠️ Technologies Used

  • Python 3.x
  • Streamlit
  • Pandas
  • scikit-learn
  • NLTK
  • TMDB API
  • Pickle (for model serialization)

📊 Dataset

The project uses the TMDB 5000 Movie Dataset from Kaggle, which includes:

  • TMDB 5000 Movie Dataset
    • tmdb_5000_movies.csv: Contains movie metadata
    • tmdb_5000_credits.csv: Contains movie credits and cast information

🚀 Setup and Installation

  1. Clone the repository
  2. Install required packages:
    pip install -r requirements.txt
  3. Set up TMDB API key:
    • Create a .env file in the root directory
    • Add your TMDB API key: TMDB_API_KEY=your_api_key_here

🎯 How It Works

  1. Data Preprocessing:

    • Merges movies and credits data
    • Extracts relevant features (genres, cast, crew, keywords)
    • Processes text data using natural language processing techniques
  2. Feature Engineering:

    • Converts text data to vectors
    • Calculates similarity scores between movies
    • Creates a recommendation model
  3. Recommendation Process:

    • Takes a movie input from user
    • Finds similar movies using cosine similarity
    • Fetches movie posters from TMDB API
    • Displays top 5 recommendations with posters

🏃‍♂️ Running the Application

Run the Streamlit app:

streamlit run app.py

📝 Project Structure

  • main.ipynb: Contains the data preprocessing and model creation code
  • app.py: Streamlit web application code
  • movies.pkl: Serialized movie data
  • vectorsSim.pkl: Serialized similarity vectors
  • requirements.txt: Project dependencies

🤝 Contributing

Feel free to fork this repository and submit pull requests. You can also open issues for bugs or feature requests.

📄 License

This project is open source and available under the MIT License.

About

Streamlit Movie Recommender: Suggests five similar movies using content-based filtering and cosine similarity, fetching posters via TMDB API for an interactive Python app with a visually rich interface.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors