Movie Recommendation System

Python Django HTML5 CSS3 JavaScript Pandas NumPy scikit-learn

This project let user input any movie titles and click one of the results.

After clicking, it shows the movie details as well as recommendations based on the movie.

Setup

Download Python. Run these commands:

# Install Django
python -m pip install Django

# Move to the file directory
cd movie_recommendation

# Run the local server
python manage.py runserver

Code Example

As soon as a user input is entered, the fetch API is called to send the input to backend

fetch(url,{
              method:'POST',
              headers:{
                  'Content-Type':'application/json',
                  'X-CSRFToken':csrftoken,
              },
              body:JSON.stringify({'title':title,'genres':genre_set})
            })
            .then((res) => {
              // return Promise
              return res.json()
            })

Then, backend executes cosine similarity to make recommendations and returns top movies with highest similarities.

   cv = CountVectorizer()
   vectors = cv.fit_transform(df['comb'].astype('U'))
   target = vectors[index_of_title]

   result = cosine_similarity(vectors,target)

API References

Created account in https://www.themoviedb.org/, then got own API key.

Sources of the datasets

Demo

movie-recom_38L1zc4E.mp4

References

This github repository helped us to create this web application.

https://github.com/kishan0725/The-Movie-Cinema

Project Report

Here is our project report: Project Report