Skip to content

abhicodes369/nutri-analysis

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Nutri AI — Nutrition Agent

Nutri AI is a Streamlit app that uses a LangGraph ReAct agent plus the USDA FoodData Central API to answer nutrition questions, compare foods, and visualize macro/micronutrients.

Workflow Overview

The high‑level interaction flow between the user, agent, and tools is:

Nutri AI workflow

Key Files

  • main.py: Streamlit UI for the app.

    • Sets up the page, sidebar, and two modes: “💬 Chat with Agent” and “🔍 Quick Nutrition Lookup”.
    • Manages session state, renders the chat history, and draws nutrition charts for USDA data.
  • agent.py: LangGraph ReAct agent and tools.

    • Defines tools like search_food, get_nutrition, and compare_foods that call the USDA API.
    • Builds the Groq LLM client and build_agent_executor, plus run_agent used by the Streamlit app.

Running the App

  1. Install dependencies:
pip install -r requirements.txt
  1. Create a local.env (or .env) file in this folder with:
USDA_API_KEY=your_usda_api_key
GROQ_API_KEY=your_groq_api_key
  1. Start Streamlit:
streamlit run main.py

Then open the URL shown in your terminal (usually http://localhost:8501) to use Nutri AI.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages