Giter VIP home page Giter VIP logo

cocktail_matcher's Introduction

Not-So-Dry Cocktail Matcher

This demo code helps you find your perfect cocktail recipes in this "not-so-dry" January. It leverages the Huggingface's dataset, cocktails_recipe_no_brand, which contains 6.6K cocktail recipes. The data fields title, glass, garnish, recipe, and ingredients are concatenated into combined_text and processed using OpenAI's text-embedding-ada-002 to build embeddings. The dataset and precomputed embeddings are stored in Neon's serverless PostgreSQL database.

The script uses function calling to extract desirable cocktail attributes from a given user input. The formated query is constructed by the extract (and enriched) cocktail attributes, formatted in the same way the Huggingface recipe texts are combined. The L2 distance is used for the similarity search to find the best-matched cocktail recipes. Note that function calling not only helps extract and structure the user input but also enrich it. For instance, if a user asks for "old fashion", the ingredients and recipe are auto-populated by OpenAI's API response.

Below is a simple interface of the Cocktail Matcher. Alt text

Topher said we are taking this little thing to a bar on Feburary 1st.

cocktail_matcher's People

Contributors

yanoyan 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.