Skip to content

Personal project to understand how to use HuggingFace's JS libraries, such as inference, hub, and agents.

Notifications You must be signed in to change notification settings

VadeanFlaviuAlexandru/Gordon-Ramsay-Simulator-ish-Demo

Repository files navigation

Gordon Ramsay Simulator-ish Demo

Personal project to understand how to use HuggingFace's JS libraries, such as inference, hub, and agents.

This is a simple demo. I'm planning to expand this in a different repository.

Key FeaturesScreenshotsScreenshots

Key Features

  • Hosted on netlify
  • You can paste the link of a file image (or upload) a food item, then chef Gordon Ramsay will analyze it. The analyzation of the item is done using the 'nlpconnect/vit-gpt2-image-captioning' model, after which we use 'dandelin/vilt-b32-finetuned-vqa' to ask a simple question: "Is this food, yes or no? if yes, what food is in this image?".
  • After receiving a positive answer, you can ask for the recipe which is done with 'auhide/chef-gpt-en'
  • I used Next.js and it's support for API routes
  • The 'multiparty' package for parsing HTML form data (because you have the possibility to upload an image locally)
  • The 'fs' module from Node.js for handling the file system
  • Based on the image, Ramsay will give different responses.

Hugging Face Libraries

  • Everything is taken from their official documentation , but in general:
    • @huggingface/inference: Use Inference Endpoints (serverless or dedicated) to make calls to 100,000+ Machine Learning models
    • @huggingface/agents: Interact with HF models through a natural language interface

Screenshots

image

image

image

image

image

About

Personal project to understand how to use HuggingFace's JS libraries, such as inference, hub, and agents.

Topics

Resources

Stars

Watchers

Forks