An interactive AI-powered web app that generates macronutrient breakdowns and personalized recipes based on user dietary preferences and allergies. Built with Streamlit and Google Cloud Vertex AI.
- Macronutrient Analysis: Breaks down food into Carbohydrates, Protein, and Fat.
- Personalized Recipes: Adapts to dietary preferences (Vegan, Keto, etc.).
- Allergy Awareness: Excludes ingredients based on user allergies.
- Cooking Time Customization: Adjusts recipes based on available cooking time.
- Fully Standalone: No external script dependencies.
https://github.com/roya90/RecipeBot.git
cd RecipeBot
Make sure you have Conda installed. Then, create a new environment and install the necessary packages.
conda create --name recipe-ai python=3.9 -y
conda activate recipe-ai
pip install streamlit google-cloud-aiplatform
- Create a Google Cloud Project.
- Enable Vertex AI API.
- Set up authentication with:
gcloud auth application-default login
- Set environment variables for your Google Cloud Project:
(Or store these in a
export VERTEX_PROJECT_ID="your-project-id"
.env
file.)
streamlit run RecipeBot.py
- Streamlit → For UI interaction
- Google Cloud Vertex AI → For AI-powered text generation
- Regular Expressions (re) → For structured response parsing
Modify generation_config
and safety_settings
in the script to adjust AI behavior.
- Add memory persistence to remember user preferences.
- Integrate a food database API for verified macronutrient values.
This project is licensed under the MIT License.
Feel free to fork this repo and submit a pull request! 🚀