Skip to content
This repository has been archived by the owner on Oct 23, 2024. It is now read-only.

slyt/macro-counter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

macro-counter

Using LLMs to count macro nutrients (macros)

Setup

Tested using Nvidia GPU for acceleration. If using Nvidia, ensure you have compatible CUDA runtime (run nvidid-smi) and CUDA toolkit (run nvcc --version) installed for building llama-cpp-python.

Copy .env_example to .env and put in your API key from FoodData Central

python -m venv env
source env/bin/activate
pip install -r requirements.txt
CMAKE_ARGS="-DLLAMA_CUDA=on" pip install llama-cpp-python --force-reinstall --no-cache-dir
python download_models.py
./start_server.sh &
python main.py

TODO

  • Parse recipes from the web
  • Parse strings to pint quantities
  • Add ability to cache recipes
  • Calculate macro needs based on height, weight, age, gender
  • Use JSON mode in instructor so llama-3 can be used
  • Add RecipeBook object that keeps track of cached recipes
  • Get macro values for each ingredient
  • Adjust macros based on goals: lose weight, build muscle, maintain
  • Create meal plan for individual based on recipes and macro requirements
  • Create meal plan for groups of people
  • Create shopping list based meal plan
  • Calculate prices using grocery stores' APIs

Built using

See Also

About

Using LLM to count macro nutrients

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published