Skip to content

tvirat/Movie-Recommendation-System

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

56 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🎬 Movie Recommendation System

📌 Description

This project provides personalized movie recommendations using two approaches:

  • Collaborative Filtering for older movies based on user ratings and a Random Classifier model for further recommendations.
  • For newly released movies not in our dataset, we integrate The Movie Database (TMDb) API to generate recommendations.

💡 Motivation

I built this project to explore different recommendation algorithms and understand how collaborative filtering and machine learning models work together to enhance movie recommendations. Additionally, integrating an external API for handling edge cases was a valuable learning experience.


📖 Index


📁 File & Folder Structure

📦 movie-recommendation-system
├── backend/                # Flask backend
│   ├── app.py             # Main Flask application
│   ├── main.py           # Collaborative filtering & classifier model
│   ├── requirements.txt   # Backend dependencies
│   ├── config.py          # API keys and environment variables
│   └── ...
├── frontend/              # React + Vite frontend
│   ├── src/
│   │   ├── components/    # React components
│   │   ├── pages/         # Pages for the app
│   │   ├── App.js         # Main app file
│   │   ├── index.js       # React entry point
│   │   └── ...
│   ├── public/            # Static files
│   ├── package.json       # Frontend dependencies
│   └── vite.config.js     # Vite configuration
├── README.md              # Project documentation
├── .gitignore             # Git ignore file
└── LICENSE                # License file

⚙️ Technical Details

  • Frontend: React + Vite (deployed on Vercel)
  • Backend: Python + Flask (deployed on Render)
  • Recommendation Models:
    • Collaborative Filtering using an open-source old movie dataset (10,000+ movies, user ratings)
    • Random Classifier Model with scikit-learn
    • TMDb API for newly released movie recommendations
  • Main Libraries Used: pandas, numpy, scikit-learn, Flask, requests
  • Database: MySQL for storing movie dataset in a structured format

🛠 Installation (For Local Use)

Prerequisites

  • Python 3.8+
  • Node.js & npm
  • API key from TMDb

Backend Setup

cd backend
python -m venv venv  # Create virtual environment
source venv/bin/activate  # Activate it (Mac/Linux)
venv\Scripts\activate  # (Windows)
pip install -r requirements.txt
  • Add your TMDb API Key in config.py:
    TMDB_API_KEY = "your_api_key_here"
  • Run the backend:
    python app.py

Frontend Setup

cd frontend
npm install  # Install dependencies
npm run dev  # Start the React app

🚀 Usage Guide (Deployed Version)

How to Use

  1. Ensure that the backend is running. (It should say The backend is running successfully!)
  2. Go to the frontend link.
  3. Enter a movie name.
  4. Enter the number of recommendations required.
  5. Click on submit to get recommendations.

UI Preview


📝 License

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


💡 Feedback & Contributions

We appreciate any feedback and bug reports! Please use the GitHub Issues tab to report bugs, suggest improvements, or share your thoughts. However, we are currently not accepting further contributions at this time.


🙌 Acknowledgements

  • TMDb for the movie data API.

Releases

No releases published

Packages

No packages published