Skip to content

RecipeGPT is a Flask-based project utilizing a trained Hugging Face GPT-2 Model to deliver personalized recipe recommendations, including JainRecipes and AI-generated dishes, based on user-provided ingredients.

License

Notifications You must be signed in to change notification settings

JainRecipes/RecipeGPT

Repository files navigation


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

About

RecipeGPT is a Flask-based project utilizing a trained Hugging Face GPT-2 Model to deliver personalized recipe recommendations, including JainRecipes and AI-generated dishes, based on user-provided ingredients.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published