Skip to content

This repo contain end-to-end movie recommender system from its data pre-processing to model building to its deployment.

Notifications You must be signed in to change notification settings

sumit-jr/movie-recommender-system

Repository files navigation

Content-based-Movie-Recommendation-System

Python Framework API Deploy

movie-recommender-system

Content-Based Recommender System recommends movies similar to the movie user likes and analyses the sentiments on the reviews given by the user for that movie.

NOTE: The application has been updated to a newer version. Get the source code of the newer version here

Check out the live demo: https://mrs-sumitsah.herokuapp.com/

The details of the movies(title, genre, runtime, rating, poster, etc) are fetched using an API by [TMDB],(https://www.themoviedb.org/documentation/api) and using the IMDB id of the movie in the API, I did web scraping to get the reviews given by the user in the IMDB site using streamlit and performed sentiment analysis on those reviews.

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. You will see the API key in your API sidebar once your request is approved.

How to run the project?

Install all the libraries mentioned in the requirements.txt file. Clone this repository in your local system. Replace YOUR_API_KEY in the app.py file. Open the command prompt from your project directory and run the command python app.py. Go to your browser and type http://localhost:8501/ in the address bar. Hurray! That's it.

Similarity Score :

How does it decide which item is most similar to the item user likes? Here we use the similarity scores.

It is a numerical value ranges between zero to one which helps to determine how much two items are similar to each other on a scale of zero to one. This similarity score is obtained measuring the similarity between the text details of both of the items. So, similarity score is the measure of similarity between given text details of two items. This can be done by cosine-similarity.

How Cosine Similarity works?

Cosine similarity is a metric used to measure how similar the documents are irrespective of their size. Mathematically, it measures the cosine of the angle between two vectors projected in a multi-dimensional space. The cosine similarity is advantageous because even if the two similar documents are far apart by the Euclidean distance (due to the size of the document), chances are they may still be oriented closer together. The smaller the angle, higher the cosine similarity.

cosine distance

More about Cosine Similarity :Understanding the Math behind Cosine Similarity

Similarity pkl file

Due to its larger size of >100MB, i couldn't able to upload it. But it the user will run the notebook then you can easily see it on your device destination folder.

Sources of the datasets

https://www.kaggle.com/datasets/tmdb/tmdb-movie-metadata

About

This repo contain end-to-end movie recommender system from its data pre-processing to model building to its deployment.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published