Skip to content

Latest commit

 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Using AWS Titan multimodal embeddings for searching movie by title and poster

Screenshot 2023-12-02 at 11 14 50

Demo project to create a search engine for movies using AWS Titan multimodal embeddings. An AWS account is required to create the embeddings, the application itself, as well as Opensearch run locally.

Pre-requisites

  • AWS account
  • Access to AWS Bedrock and AWS Titan models
  • Docker compose / Docker
  • Python 3.9 or above

Remark: Using AWS Bedrock and AWS Titan is not covered by the free tier.

Setup

Install the required python packages:

pip install -r requirements.txt

Start opensearch and the opensearch dashboard with docker-compose:

docker-compose up -d

Prepping the data

Artboard_oppen

The notebook data_prep.ipynb contains the code to fetch the data and create the embeddings before storing them in and opensearch index.

  • Downloads the images and meta-data
  • Creates the embeddings
  • Create the index
  • PUT the embeddings to the index

The movielens folder contains data on 56 movies (released in 2023 and more than 150 ratings on Movielens)

Gradio Application

The app.py file contains the code to run the gradio application. The application allows you to search for movies by title and poster. The application will return the top 3 results based on the cosine similarity between the query and the embeddings via an Opensearch knn query.

Article on Medium

Article

About

Demo application to showcase Titan multimodal embeddings to retrieve movies based on title / image descriptions

Resources

Stars

4 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages