Best Flask open-source libraries and packages

Microsoft Intern Engage

Next-up, a movie recommendation system project created for Microsoft Intern Engage' 2022. I got selected for Software Engineering Internship '23 via this program.
Updated 11 months ago

Next Up - Movie Recommendation System

Submission for Microsoft Intern Engage '22

Next up image

Overview

Next up is a movie recommendation system that offers generalized recommnendations to every user based on movie popularity, genre, and year. The model also give personalized recommendations based on the user's choice of genre and cast. Finally, the system suggests similar movies have a higher probability of being liked based on the movie selected by user.

A deployed version can be checked here: Next Up

Features

  1. Sign-up and Sign-in functionality. ✔️

  2. Forgot password (resetting password) functionality. ✔️

  3. OTP validation. ✔️

    The user receives a mail containing OTP for validation before resetting the password.

  4. Restrictions and validations on the sign-up page, sign-in page, forgot password functionality, OTP validation page, and reset password page. ✔️

  5. The User’s credentials are stored in the database. ✔️

  6. Completely responsive frontend. ✔️

  7. A total of 4 types of recommendations:

  • Recommended movies based on the user's chosen genres and casts. ✔️
  • Most popular movies based on different genres. ✔️
  • Most popular movies based on different years. ✔️
  • Recommended movies similar to the user's selected movie. ✔️
  1. Movie details and trailer linked for each movie. ✔️

  2. Watch a movie option. ✔️

  3. Option to like or dislike a movie. ✔️

  4. Client-side session tracking. ✔️

  5. Continious deployment. ✔️

Interfaces

Landing Page

  • Seamless landing page with Sign-in and Sign-up (Get Started) button.

home page

Sign-up Page

sign-up page

Sign-in Page

5 - sign-in

OTP Validation Page

11 - otp validation

Reset password Page

14 - reset

Restrictions and validations on the sign-up page, sign-in page, forgot password functionality, OTP validation page, and reset password page

  • All fields not filled
  • Email account already registered (sign-up), Email account not registered (sign-in)
  • Incorrect password, OTP incorrect
  • Email address not entered, OTP not entered, new password not entered

6 - validations

Choices Page

  • Page for choosing prefered genres and casts used for recommending movies

choices

Recommendations page

  • This page shows recommended movies based on genres and casts chosen by the user.
  • It also displays most popular movies based on different genres and years.

16 - recommendations

Movie Page

  • This page shows details and trailer of the movie selected by the user.
  • It also recommends similar movies to the user based on the selected movie.

18 - movie

Watch Movie Page

  • This page is to watch the movie selected.

19 - watch

Tech Stack and Softwares used

  1. Frontend : HTML5, CSS3, JavaScript, BootStrap, jQuery
  2. Backend : Python flask
  3. Database : PostgreSQL, SQLite3
  4. ML model : Jupyter Notebook
  5. IDE : PyCharm
  6. Version Control : Git
  7. Deployment : Heroku

You can also see the list of dependencies in the requirements.txt file.

Libraries and Toolkits used

Python : NumPy, Pandas, ast (Abstract Syntax Trees), pickle

ML : ntlk (Natural Language Toolkit), sklearn (scikit-learn)

SQLite : sqlite3, SQLAlchemy

Recommendation Algorithm

For recommendations of similar movies, a content-based recommendation system. For recommendation, the system takes into account movie titles, genres, starring cast, keywords, overview, and the director. I have implemented Cosine Algorithm after the vectorization of movies. It is achieved by using Annoy (Approximate Nearest Neighbors) mechanism. Resource for Annoy: https://github.com/spotify/annoy

Deployment

For Deployment, I have used Heroku as a platform. A deployed version can be checked here: Next Up

Installation/Environment Setup

  1. Clone this repository in your local system.
  • Open terminal in a new folder and enter the command given below.
    git clone https://github.com/kashishahuja2002/Minor-Project-Next-Up.git
    
  1. Make sure that Python is installed and updated in your machine.

  2. Install dependencies.

  • Open terminal in the cloned folder and enter the command given below.
    pip3 install -r requirements.txt
    
  1. Run the project.
  • While you are still inside the cloned folder, write the following command in terminal to run the website locally.
    python app.py
    
  1. If everything is done in order, the app will be running at "http://127.0.0.1:5000"

CD Setup

For continious deployment, heroku is used. Any changes pushed to the main branch will be automatically deployed.

Future Scope

  • Like/Dislike : The option to like or dislike a movie adds the movie to the user's like/dislike list. As of now, I am just accumulating the data. This can be further extended by using the like/dislike list to recommend movies to the user.

  • Watch Movie : The watch movie option currently displays the same movie intro for all the movies. In the future, it can be customized according to the movie selected.

  • Collabrative Filtering : The model currently uses a content-based recommendation system. It can be converted into a hybrid system by adding a collaborative filtering mechanism.

Documentation

A complete project report for the system with use case diagram, web flow, ER diagram, wireframes, etc can be found here: Next Up | Project Report.

A short and crisp version of the documentation can be found here: Next Up | Documentation.

A presentation for the project can be found here: Next Up | Presentation.

Video Demo

The demo video for the app can be checked here: Next Up | Video



Thank you, Microsoft Team for such a wonderful mentorship program ❤️