Table of Contents
RecipeGPT is a project that can create recipe recommendations. Using Flask and an available Hugging Face GPT-2 Model that was trained on the RecipeNLG dataset, RecipeGPT will both provide the recommended JainRecipes along with an assortment of GPT-2 generated recipes. Users will be able to select what ingredients they have at home from a comprehensive list scraped from JainRecipes and will be provided with a personalized culinary recommendation.
Relevant libraries include:
- flask
- json
- Levenshtein/fuzz (for similar string identification)
- transformers/hugingface (for the gpt-2 model)
- re
- BeautifulSoup
- markdown
- datetime
- random
- os/dotenv
- requests
- time
To setup on your local machine
- Generate a GitHub Access Key (needed to scrape JainRecipes) & a Spoonacular API key if you wish to use spoonacular for image/recipe link generation
- Clone the repo
git clone https://github.com/JainRecipes/RecipeGPT.git
- Install all prerequisites (requirements.txt has all pip libraries and extras from other projects I have worked on)
pip install -r requirements.txt
- Enter your API in
.envGITHUB_ACCESS_TOKEN = SPOONACULAR_API_KEY =
- Run the app
python app.pyDistributed under the MIT License. See LICENSE.txt for more information.
Credit to Pratul Tandon for training the GPT-2 model for recipe generation based on the RecipeNLG dataset. More info here https://huggingface.co/pratultandon/recipe-nlg-gpt2
