GithubHelp home page GithubHelp logo

dhavalcode / nutrition-ai-package Goto Github PK

View Code? Open in Web Editor NEW
2.0 1.0 0.0 23 KB

AI wrapper of google gemini pro vision model designed to analyze food-related images.

Home Page: https://www.npmjs.com/package/nutrition-ai

TypeScript 100.00%
ai gemini gemini-pro-vision npm-package wrapper

nutrition-ai-package's Introduction

nutrition-ai serves as a wrapper for a google gemini pro vision model designed to analyze food-related images. This package provides detailed nutritional information about the presented food items, including caloric content, nutritional value, and personalized dietary recommendations.

Installation

Install with npm

  npm i nutrition-ai

Usage

import { generateAnswer } from "nutrition-ai";

const answer = await generateAnswer({ fileBase64, fileMimeType, googleKey });

Features

  • Food Item Analysis: Obtain detailed information about each identified food item, including caloric content and health benefits.
  • Total Calories Calculation: Evaluate the sum of calories for all identified items to provide a comprehensive view of the meal's energy content.
  • Overall Nutritional Value Assessment: Analyze the meal's nutritional balance and healthfulness, offering personalized dietary advice.
  • Nutritional Composition Breakdown: Break down the nutritional composition, emphasizing the percentages for macronutrients.
  • Dietary Recommendations: Provide actionable advice for enjoying the meal in a healthy manner, including portion sizes and alternative ingredients.

API Reference

  • generateAnswer():
    • Parameters:
      • fileBase64 (string) : file content as base64.
      • fileMimeType (string): image/jpeg / image/png
      • googleKey (string) : google AI key (grab it from https://makersuite.google.com)
      • model (string) : model is optional. By default, it will use gemini-pro-vision model.
    • Returns:
      • text: The text contains generated answer from model.

Authors

nutrition-ai-package's People

Contributors

dhavalcode avatar

Stargazers

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