This project implements a movie recommendation system using both content-based filtering and collaborative filtering techniques. It takes input from users about movies they have watched and provides movie recommendations based on their preferences. The recommendation engine uses features such as genres, ratings, and actors to suggest movies that the users are likely to enjoy.
The Movie Recommendation System provides movie suggestions using two main approaches:
- Content-Based Filtering: This method suggests movies similar to the ones the user has rated highly, using metadata such as genres, actors, and ratings.
- Collaborative Filtering: This method recommends movies based on the preferences of similar users (user-item interactions).
The system can recommend movies that are enjoyable for a group of users based on their collective movie preferences, including genre, actors, and ratings.
- Python: Language
- Flask: For creating the API that serves recommendations.
- Pandas: For data manipulation and preprocessing.
- Scikit-learn: For implementing content-based filtering using cosine similarity.
- MinMaxScaler: For normalizing ratings.
-
Clone the Repository
Clone this repository to your local machine:git clone <repository-url>
-
Install Dependencies
Install the necessary Python packages using pip:pip install -r requirements.txt
-
Download the Dataset
Place yourIMDB-Movie_data.csvfile in the project directory. The CSV file should contain at least the following columns:User: User identifierTitle: Movie titleGenres: Comma-separated list of genresRating: Rating provided by IMDBActors: Comma-separated list of actorsDirector: Director of the movieYear: Release year of the movieDescription: Brief description of the movieVotes: Number of votesMetascore: Metascore rating
-
Run the Flask API
Start the Flask API by running the following command:python app.py
The API will be accessible at
http://127.0.0.1:5000/.
Modify the user_input_movies list in the script to include the movie titles you like.
Example
user_input_movies = ["The Shawshank Redemption", "The Godfather"]
The program will output the top recommended movies based on the input.
Recommended Movies: Title Genre Rating 34 The Dark Knight Rises Action 8.4 48 Gladiator Action 8.5 27 The Dark Knight Action 9.0
Contributions: Only Group H members
- Fork the repository
- Create a new branch for your feature or bug fix
- Commit your changes
- Push to your forked repository
- Submit a pull request
This project is licensed under the MIT License - see the LICENSE file for details.