The Recipe Generator is a GUI application that leverages the power of GPT to generate 1000 kcal recipes, focusing on bulking diets. Designed to cater to specific dietary preferences and caloric requirements, it emphasizes variety and taste, offering a unique solution for managing dietary goals.
- High Customizability: Tailor every aspect of your diet – from meal types to cuisines and protein sources. This allows for a personalized diet plan that caters to individual tastes and nutritional needs.
- Bulk Recipe Generation: Unlike manual methods, this application can generate a large number of recipes at once – even 100 or more. This is particularly useful for planning meals over an extended period or for those who prefer batch cooking.
- Efficiency Over Manual Methods: While you could use services like ChatGPT with careful prompt engineering for single recipes (or idk, 10 at once? 20?), this application streamlines the process, generating multiple recipes automatically and efficiently.
- Customizable Caloric Intake: Tailor your recipes to meet specific caloric goals, with a default setting of 1000kcal (Note: it's not in User Configuration Section, must be done inside prompts to OpenAI. Simply use ctrl + F "1000", and change as you wish).
- Diverse Cuisine Options: Choose from various cuisines to keep your diet interesting and varied.
- Diet Flexibility: Adjust the application for different dietary needs, including both bulking and reducing diets - must be done manually in prompts (regular prompt and system prompt).
- Data Management: Efficiently manage recipes through an integrated Excel file system.
- User-Friendly GUI: Easy to navigate interface for simple user experience.
- Python: The core language used for backend development.
- OpenAI API: Enables dynamic and variable-driven recipe generation.
- Excel: Utilized for storing and manipulating recipe data.
-
Recipe Generation Process:
- The application randomly selects a meal type and a cuisine.
- A main protein source is randomly chosen.
- A prompt is dynamically created and sent to the OpenAI API to generate a unique recipe.
-
Parsing and Storing Recipes:
- The generated recipes are parsed and formatted.
- Valid recipes are collected and saved to an Excel file.
-
User Feedback and Progress Tracking:
- Real-time feedback on the number of recipes generated and estimated time remaining (in console).
- Ensure Python is installed on your system.
- Clone or download the Recipe Generator code.
- Navigate to the directory of the downloaded code.
- (Optional) Create a virtual environment and activate it.
- Install the necessary dependencies with
pip install -r requirements.txt
. - Create a
.env
file in the root directory with your OpenAI API key like this:OPENAI_API_KEY=sk-yourkey
.
- Open
main.py
in your code editor. - Set the
openai_model
variable to your preferred model (e.g.,gpt-4-1106-preview
orgpt-3.5-turbo-1106
- visit for info: https://platform.openai.com/docs/models/overview). - Customize the
window_title
to change how the GUI window is named. - Modify
meal_types
as needed. Note: Keep 'Liquid' for high-calorie, low-volume meals, especially useful for hardgainers. - Change
cuisines
andprotein_sources
to include your preferred options. - Update
inappropriate_ingredients
to exclude certain items from liquid recipes (this is important, otherwise it might produce bs like steak inside shake :P). - Comment out the 'Liquid' section in
generate_recipe
if focusing on weight reduction (you probably don't want low volume, high calorie, but totally opposition, and liquid calories are like this. You don't consume much volume, but you consume a lot of calories).
Run the application by executing main.py
. Input the desired number of recipes in the GUI, and the application will generate and display the progress.
Contributions are welcome! If you have suggestions or improvements, please feel free to fork the repository and submit a pull request.
- The best models for recipe generation are from 'GPT-4 family' but other like GPT-3.5 Turbo can also be effective.
- The estimated time for recipe generation is based on the time taken to create the first recipe and is adjusted as more recipes are generated.
- This thing is not generating instructions how you should prepare your meals, however you can add it to the prompt, if you want.