Skip to content

Latest commit

 

History

History
150 lines (103 loc) · 4.14 KB

File metadata and controls

150 lines (103 loc) · 4.14 KB


Logo

RecipeGPT

Easily find recipes based on what ingredients you have at home! Inspired by JainRecipes!

Table of Contents
  1. About The Project
  2. Getting Started
  3. License

About The Project

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.

RecipeGPT Demo

(back to top)

Built With

  • Python
  • Flask
  • Bootstrap
  • Huggingface



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

(back to top)

Getting Started

Installation

To setup on your local machine

  1. Generate a GitHub Access Key (needed to scrape JainRecipes) & a Spoonacular API key if you wish to use spoonacular for image/recipe link generation
  2. Clone the repo
    git clone https://github.com/JainRecipes/RecipeGPT.git
  3. Install all prerequisites (requirements.txt has all pip libraries and extras from other projects I have worked on)
    pip install -r requirements.txt
  4. Enter your API in .env
    GITHUB_ACCESS_TOKEN = 
    SPOONACULAR_API_KEY = 
  5. Run the app
python app.py

(back to top)

License

Distributed under the MIT License. See LICENSE.txt for more information.

(back to top)

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