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.
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
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)
Created account in https://www.themoviedb.org/, then got own API key.
movie-recom_38L1zc4E.mp4
This github repository helped us to create this web application.
https://github.com/kishan0725/The-Movie-Cinema
Here is our project report: Project Report