Skip to content

vilasrhegde/MovieRecommendation

Repository files navigation

Movie Recommendation System - Python

A website made using difflib library and Streamlit

Check this website now!

How am I giving suggestions?

  1. Reading the .csv file

  2. Some features are selected for further calculations

    • Genres
    • Keywords
    • Tagline
    • Cast
    • Director
  3. Replacing all the null values with null string

for feature  in selected_feature:
mov_data[feature]=mov_data[feature].fillna('')
  1. Combining all the selected features
  2. Converting text data into feature vector vectoriser = TfidfVectorizer()

A feature vector is an n-dimensional vector of numerical features that represent some object

  1. Getting Similarity scores using Cosine similarity cosine_similarity(feature_vectorizer)
  2. Getting movie name as input from user
  3. Searching similar names based on that movie title to find the closest match
  4. Selecting the first obtained movie title and get its index value
  5. Getting similarity score by with all the movies in database list(enumerate(similarity[index_of_movie]))
  6. Slice and select any length of movies name, i gave 10 suggestions

How did I do using Streamlit

  1. Import pickle library
  2. Dumping the loaded model into .pkl file pickle.dump(similarity, open(filename,'wb'))
  3. Load the model by using pickle.load(open('similarity.pkl','rb')) function
  4. Do all the remaining operations to get the suggestions

Choose a movie from dropdown, and boom!

image

Dig more with Directors!

image

Genre Specific visualization

image

Popular movies

image

Tools needed

  1. Dataset
  2. Numpy
  3. Pandas
  4. Difflib
  5. Pickle
  6. Streamlit
  7. TfidfVectorizer from sklearn
  8. Cosine_similarity from sklearn