Community Spotlight

Movie Recommender powered by Jina AI

Find the perfect movie for your mood!

Achintya
Jina AI

--

Introduction

Have you ever felt confused and wondered what new movie to watch, or watch a movie of a particular genre or maybe even a new movie that is similar to your favorite movie.

Well, why not make our own Movie Recommender that takes a text query as an input and gives you a list of movies according to the query.

This use case can be thought of as a text search problem where the search system takes input as a text query and searches for movies similar to the query within the database.

How it Works?

This recommender uses textual data to find the most relevant movies according to the text provided. We provide the name, description, and genre of the movies to the model from our database.

Technical StackJina, Rest API, Dart

Database UsedIMDB Movies Dataset

Architecture Diagram

Following is the step-by-step walkthrough of the application logic:

  • Fetch the Movies Dataset from Kaggle.
  • Add the data to Jina’s DocumentArray for further pre-processing and indexing.
  • Pass the DocumentArray to Jina’s Flow for indexing of data using Jina Hub Executors.
  • The search flow will encode the input query and search through the indexed data for the nearest match.
  • After finding the best possible match, the output data is sent as a Rest API which can be used for various frontend frameworks.

Code Walkthrough

The key components of this application are building a Flow, indexing, and search functionality. Let’s look at each of them one by one:

Create a Flow → The Flow consists of two Executors: SimpleIndexer and TransformerTorchEncoder

Create an Index function → The index function will take the dataset of images in text format converts them into Jina’s native DocumentArray and passes it to the Flow for indexing and searching.

Create a search function → The search function takes the text input and makes an HTTP post request to fetch similar movie titles from the Jina backend. The following code is written in dart for an enhanced user experience.

And that’s it. It’s this easy to make a neural search engine using Jina AI.

For full application source code, check out the following GitHub Repository.

Movie Recommender in Action

Learning Resources

--

--

Achintya
Jina AI
Writer for

Computer Science student learning, doing and sharing about Flutter and Machine Learning