NutriScan is a Discord bot that provides nutritional estimates for meals based on images you provide. It utilizes OpenAI's GPT-4 Vision model to analyze images of food and return a concise breakdown of their nutritional content.
- Analyzes images of meals and provides a nutritional estimate.
- Supports various image formats (jpg, jpeg, png, gif, bmp).
- Provides a concise breakdown of total calories, protein, fat, and fiber content.
- Includes a 'Breakdown' of each major component of the meal.
This project consists of two main Python scripts: bot.py
and vision_ai.py
- This script is responsible for the main functionality of the bot. It handles user interactions, processes user inputs, and generates appropriate responses. The bot uses various AI and machine learning techniques to understand and respond to user queries.
- This script is responsible for image analysis. When provided with an image of a meal, it gives a concise nutritional estimate using midpoint values for ranges. The response includes total calories, protein, fat, and fiber content. It also provides a breakdown of each major component of the meal. If the image does not depict food, it responds with a message asking for an image of a meal.
git clone https://github.com/yourusername/nutri-bot.git
pip install -r requirements.txt
DISCORD_BOT_TOKEN=your_discord_bot_token
OPENAI_API_KEY=your_openai_api_key
python bot.py
To use NutriScan, simply mention it in a Discord chat and attach an image of a meal. NutriScan will analyze the image and provide a nutritional estimate in response.
NutriScan uses OpenAI's GPT-4 Vision model for image analysis.