A content-based recommender system that recommends movies similar to the movie the user.
The movies are recommended based on the content of the movie you entered or selected. The main parameters that are considered for the recommendations are the genre, director, and top 3 casts. The details of the movies, such as title, genre, runtime, rating, poster, casts, etc., are fetched from TMDB.
Create an account in https://www.themoviedb.org/. Once you successfully created an account, click on the API link from the left hand sidebar in your account settings and fill all the details to apply for an API key. If you are asked for the website URL, just give "NA" if you don't have one. You will see the API key in your API sidebar once your request has been approved.
- Clone or download this repository to your local machine.
- Install all required libraries after thoroughly reading the code
- Get your API key from https://www.themoviedb.org/. (Refer the above section on how to get the API key)
- Replace YOUR_API_KEY in both the places (line no. 15 and 29) of static/recommend.js file and hit save.
- Open your terminal/command prompt from your project directory and run the file main.py by executing the command python main.py.
- Go to your browser and type http://127.0.0.1:5000/ in the address bar.
- Yay! That's it.
sources of datasets
- IMDB 5000 Movie dataset - https://www.kaggle.com/carolzhangdc/imdb-5000-movie-dataset
- The movie datset -https://www.kaggle.com/rounakbanik/the-movies-dataset
- List of movies in2018 - https://en.wikipedia.org/wiki/List_of_American_films_of_2018
- List of movies in2019 - https://en.wikipedia.org/wiki/List_of_American_films_of_2019
- List of movies in 2020 - https://en.wikipedia.org/wiki/List_of_American_films_of_2020
- List of movies in2021 - https://en.wikipedia.org/wiki/List_of_American_films_of_2021
- Lis of movies in 2022 - https://en.wikipedia.org/wiki/List_of_American_films_of_2022
(Download movies_metadata.csv and credits.csv from Kaggle)