Personal project to understand how to use HuggingFace's JS libraries, such as inference, hub, and agents.
Key Features • Screenshots • Screenshots
- 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.
- 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