Skip to content

A series of Jupyter notebooks that generate recipe names using seq2seq autoencoders and GANs.

License

Notifications You must be signed in to change notification settings

vimlord/Recipe-Name-Generation

Repository files navigation

Recipe Name Generation

This repo holds several examples of methods for generating fictitious recipe names. I wanted to generate food names, but was only able to acquire a recipe dataset. So, I decided to use the recipe names to train models to create new recipe names.

Models

In this project, I trained Seq2Seq autoencoders on recipe names to create a means of going between names and representative encodings. I also trained a Generative Adversarial Network (GAN) with the autoencoder to create a means of generating seemingly realistic recipe names.

Notebooks

In this repo, I provide a couple of notebooks. They are:

foodnames_autoencoder.ipynb

In this notebook, I only trained the autoencoder. Then, I select random encodings and use those to generate the fake recipe names.

foodnames_gan.ipynb

This notebook adds the GAN component. While the autoencoder should in principle train no differently from in the first notebook, this notebook includes the concept of GANs in the design.

Setup

I developed this notebook from Arch Linux using Keras front-end on Tensorflow 2.0. However, I do not suspect that there would be issues using plain Keras or an older version of Tensorflow (I only used tf.keras because of compatibility issues between Keras and the Tensorflow 2.0 beta). You will need Jupyter notebook to run any of the notebooks, as well as Numpy.

Examples

Here are 100 foods generated by the GAN that were not in the dataset:

  • Smothered Peanut Pork Sandwich
  • Cream Cream Cheese Ice Cookies
  • Creamed Filled Bread Dip
  • Blackened Chicken Lettuce Wraps
  • Very Frozen Coconut Banana Pork in Peanut Butter Salsa
  • Basic Sugar Bread Chowder
  • Simply Thai Shrimp Marinade
  • Creamy Baked Black Bean and Sausage
  • Baked Stuffed Biscotti
  • My Buffalo Buffalo Trout
  • Potato Cheese
  • Potato and Rice Casserole
  • Simple Crab Rangoon
  • White Mushroom Chicken
  • Old Style Coconut Milk Pie and Chocolate Pudding Pie Pudding Cake
  • No-Churn Cake Cupcakes with Pumpkin Frosting
  • Curried Coconut Biscotti
  • Soft Sugar Chocolate Oatmeal
  • Vegan Fried Rice Salad
  • Oatmeal Bread Cookies with Truvia Baking Balls II
  • Brandy Wrapped Cocktail
  • Bacon Wrapped Sausage, Tomatoes and Sun-Dried Tomato and Prosciutto
  • Potato & Onion Tart Rolls
  • Angel Kuchen
  • Raspberry Pineapple Martini
  • Cheddar Black Bean Soup
  • Sour Apple Dessert
  • Upside-Down ( Bavarian )
  • Easy Chocolate Cake
  • Love Cinnamon BBQ Salmon Chili Chili with Hot and Mint Mexican
  • Cuban Grilled Chicken Sandwich II
  • Chocolate Cucumbers
  • Roast Beef
  • My Favorite Buffalo Pad Thai
  • Stuffed Stuffed Pepper Chutney
  • Potato Chocolate Cake II
  • Quick Delicious Eggnog Salsa
  • Apple-Stuffed Acorn Stew
  • French Onion Salsa
  • Amish Applesauce Cream Pie II
  • Pepper Garlic Tofu
  • Sweet Honey Garlic Pickles
  • No-Bake Chili ( Quick with White Tomatoes Filling )
  • Smokey Pan-Fried Pesto
  • and Mushroom Pizza
  • Spicy Hot Banana Sauce
  • Healthier Bloody Chili
  • Mayo Chicken Fried Chicken
  • Citrus Crunch
  • Toasted Caramel Cake I
  • Fiery Pepper Quesadillas
  • Heather's Whisky Grilled Halibut Marinade - Spicy Mexican BBQ
  • Singapore Steak Grilled Chicken
  • Easy, Marinated Rib Roast
  • Faux Veggie Veggie Dressing
  • Artichoke Potato Dip
  • Sweet Ginger Wrap
  • Jen's Rum Fudge
  • Sweet Soup With Fast Creamy Chicken Soup ( Gluten Free )
  • The Meringue
  • Spring Avocado With Sun-Dried Tomato and Dill Peppers and Walnuts
  • Salad Pasta with Asparagus and Ice Cream Sandwich Frosting
  • Easy Potato Salad II
  • Old Style Peach Pie with Cream
  • Awesome Thai Buffalo Buffalo Trout
  • Dad's Pear Cake
  • Spring Bok A Trout
  • Scrambled Sugar Zucchini and Butter Salmon with Cream Cheese
  • Creamy Maple Herb Brussels Sprouts and Ginger Green Beans
  • Citrus Dill Tofu
  • Macaroni Meatball Chicken Noodle Food
  • Cornbread with Bread I
  • Lemon Sour Chicken
  • Vegan Vegan Cornbread Sauce
  • Cranberry Almond Butter Smoothie in Protein
  • Lime Turkey for Soup
  • Special Thai and Corn
  • Whiskey Devil's Food
  • Potato Salad
  • Old Fashioned Cranberry Peach and Potato Chicken Salad with Green Rice
  • Mexican-Style Cranberry Relish
  • Healthy Fudge
  • Old Time Home Made Quick
  • Bell Pepper Vinaigrette
  • Super Healthy S'mores Buns
  • Easy Pasta and Mushroom Quiche
  • Passover Delightful Spice Doughnuts
  • Busy Day Chocolate Sauce
  • Grilled Chocolate Spread
  • Chicken and Chicken Sandwiches II
  • Old Brown Coconut Coconut Baked Green Bean Cake with Chocolate Mint Cake
  • Chicken Chicken and Chicken Veggie Salad
  • Sweet Curry - Go Cake
  • Easy Cake II
  • Banana Roasted Roasted Red Pepper and Chicken Salad
  • Easy Coq Au Vin - Slow Cooker Barbequed Pork Breast with Bok Choy
  • Crab Cheese Roll-Ups
  • Tina's Taco Dip I
  • Fabulous Sausage Stew
  • Easy Cheese IV

Future Work

I don't know if I plan to do more with this project. However, I had a couple of ideas for how to extend the project:

  • Full recipe generation including
    • Full instructions
    • Ingredient list
  • Ingredient generation
  • Recipe image generation from recipe names

Licenses

The dataset used in the notebooks called Recipe Box provided by Eight Portions run by Ryan Lee. The dataset is covered by the ODC Attribution License. As the license requests attribution, I presume that mentioning that the license file is downloaded by any of the notebooks, along with this blurb, should be sufficient to cover the terms of use. However, if this is insufficient, I encourage the author to contact me so that I can fix any issues. The webpage I initially found the dataset at can be found here.

My code is modifiable to be used with other datasets. Therefore, the value of the code is not bound to the specific data. The code itself will be covered under the GNU Public License (GPL), a copy of which is provided with this repo.

About

A series of Jupyter notebooks that generate recipe names using seq2seq autoencoders and GANs.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published