Skip to content

This is a content-based movie recommendation engine. It is built using the Flask framework in the backend.

Notifications You must be signed in to change notification settings

anipnwr7777/movie-recommendation-using-flask

Repository files navigation

Movie recommendation engine using flask and AJAX.

Features

  • Web development on top of a machine learning model
  • Responsive webpage
  • Web Scraping
  • Asynchronous requests
  • Autocomplete during movie searching.

Demo

this project has been deployed on heroku.

https://movie-recommend-using-flask.herokuapp.com/

Tech used

Framework: Flask

API: TMDB

Frontend: HTML, CSS, JavaScript

Others: AJAX, Web Scraping

Note

The source code contains proper comments for understanding

Machine learning model

cosine similarity and similarity scores are calculated to check the similarity between movies. Refer this link

Description

This is a content based movie recommendation engine that is built using flask in the backend.

Movie recommender systems are of various types. You can read about them on this link.

A content-based recommender learns a profile of the new user’s interests based on the features present, in objects the user has rated. It’s basically a keyword specific recommender system here keywords are used to describe the items. Thus, in a content-based recommender system the algorithms used are such that it recommends users similar items that the user has liked in the past or is examining currently.

The dataset has been picked from Kaggle.

IMDB 5000 movie dataset

This only contains data till year 2016.

For 2017 data has been picked from here and here

For data of year 2018-19-20, I have done webscraping from Wikipedia.

https://en.wikipedia.org/wiki/List_of_American_films_of_2018

https://en.wikipedia.org/wiki/List_of_American_films_of_2019

https://en.wikipedia.org/wiki/List_of_American_films_of_2020

For fetching all the details of a given movie I have used an API by TMDB

details include images, genre, title , release date, director, rating https://www.themoviedb.org/documentation/api.

How to get the API Key?

Create an account in https://www.themoviedb.org/, click on the API link from the left hand sidebar in your account settings and fill all the details to apply for 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 is approved

Steps to run the project:

  1. Clone this repository locally.
  git clone https://github.com/anipnwr7777/movie-recommendation-using-flask
  1. Install requirements using the command
  pip install -r requirements.txt
  1. Get your API Key.
  2. Replace 'YOUR_API_KEY' in /static/recommend.js with your API key.
  3. Open the terminal in your IDE and enter
  python main.py
  1. Open your browser and enter this addres as URL
  http://127.0.0.1:5000/
  1. That's it your recommendation system is up and running.

Contributing

Contributions are always welcome!

About

This is a content-based movie recommendation engine. It is built using the Flask framework in the backend.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published