This is a movie recommendation system implemented in Python. The system utilizes a dataset containing information about 5000 movies to provide personalized movie recommendations to users. The recommendations are based on the user's preferences and the similarities between movies.
The dataset used in this movie recommendation system consists of 5000 movies and is stored in a CSV file. Each movie in the dataset has the following attributes:
- Title: The title of the movie.
- Genre: The genre(s) of the movie.
- Overview: A brief summary of the movie's plot.
- Keywords: Keywords related to the movie.
- Cast: The main cast of the movie.
- Director: The director(s) of the movie.
- Average Rating: The average rating given to the movie by users.
- Popularity: The popularity score of the movie.
- Poster: The URL of the movie's poster.
To run the movie recommendation system locally, follow these steps:
- Clone this repository to your local machine or download the source code.
- Install the required dependencies by running the following command:
pip install -r requirements.txt
To use the movie recommendation system, follow these steps:
- Ensure that you have installed the required dependencies (see Installation).
- Run the following command to start the recommendation system:
streamlit run main.py
- Follow the instructions provided by the system to input your preferences and receive movie recommendations.
The movie recommendation system uses a content-based filtering approach to generate recommendations. The algorithm works as follows:
- Preprocess the dataset by extracting relevant features from the movies, such as genre, keywords, and cast.
- Compute the similarity between each pair of movies using a similarity metric, such as cosine similarity.
- Given a user's preferences, calculate the similarity between the user's preferred movies and all other movies in the dataset.
- Sort the movies based on their similarity to the user's preferences and recommend the top-rated movies.
Here are a few examples of how to use the movie recommendation system:
- Input your favorite movie genres, keywords, or actors/actresses, and the system will recommend similar movies.
- Specify a particular movie, and the system will suggest movies that are similar in terms of genre, keywords, or cast.
- Rate a set of movies, and the system will recommend movies that have high similarity to your rated movies.