Code Monkey home page Code Monkey logo

find-movies's Introduction

Find Movies with AI

This is a semantic search service for movies based on a query. For example, "great fictional beautiful animals." should return a list of movies such as "Madagascar 3: Europe's Most Wanted", "Zoology" and so on.

This is based on the Vector Search provided by DataStax on its Cassandra database.

The plot of a movie was converted into a vector (embedding vector) and stored in the database which was customized with an index to calculate the nearest distance between vectors.

The converting service is provided by CO.HERE.

When a user inputs a query, the string is converted into a vector and used to find the closest search in the database.

Detail of Work

The details of the conversion and lookup functions are provided here https://github.com/linhhlp/Machine-Learning-Applications/tree/main/Text-2-Vect-Vector-Search

Database

The database used in this application is uploaded to Kaggle: https://www.kaggle.com/datasets/linhhlp/35k-movies-with-embedded-plots-to-vectors

Credentials

To provide credentials to the services of CO.HERE AI and Cassandra by DataStax, the credentials must be stored in the cred.py file. There is a template file called cred-template.py that contains the examples of credentials. Rename this template file to cred.py after that.

Containerization

With the provided Dockerfile, the container can be built with Docker.

$ docker image build -t "find_movies" .

$ docker run -d -p 80:80 find_movies

Logging

To investigate the app and the usage of users, I made a simple logging tool to save a basic data into Cassandra. If you do not want it, just remove it from app.py

Demo

The service is running on: https://find-movies.com/

The service was deployed on AWS Lambda using zappa. The process of deployment is very simple and straightforward with zappa. However, there are some issues with Zappa including do not upload zip files.

Deploy to a Domain with AWS Lambda

Follow this guide for more information: https://github.com/zappa/Zappa#deploying-to-a-domain-with-aws-certificate-manager

find-movies's People

Contributors

linhhlp avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.