Recipe Generation Model

Description:
Given a list of ingredients, generate a recipe – similar to what the GPT3 API offers: openAI recipe generator. A model exists on the hub that does Recipe NLG, but it uses a GPT2 architecture. I’m curious if T5 or Bart will produce better results.

Model:
T5 or Bart.

Dataset:
Recipe NLG (2,231,142 recipe examples) - hugging face link - download site

Data example:

{‘NER’: ‘[“oyster crackers”, “salad dressing”, “lemon pepper”, “dill weed”, “garlic powder”, “salad oil”]’,
‘Unnamed: 0’: 1000,
‘directions’: ‘[“Combine salad dressing mix and oil.”, “Add dill weed, garlic powder and lemon pepper.”, “Pour over crackers; stir to coat.”, “Place in warm oven.”, “Use very low temperature for 15 to 20 minutes.”]’,
‘ingredients’: ‘[“12 to 16 oz. plain oyster crackers”, “1 pkg. Hidden Valley Ranch salad dressing mix”, “1/4 tsp. lemon pepper”, “1/2 to 1 tsp. dill weed”, “1/4 tsp. garlic powder”, “3/4 to 1 c. salad oil”]’,
‘link’: ‘www.cookbooks.com/Recipe-Details.aspx?id=648947’,
‘source’: ‘Gathered’,
‘title’: ‘Hidden Valley Ranch Oyster Crackers’}

Script:

Maybe run_summarization_flax.py and just treat it as seq2seq?

Expected result:
Give it a list of ingredients (e.g. sugar, flour, egg, peanut butter) and it spits out a recipe (peanut butter cookies). Useful for when you are trying to use up all those miscellaneous ingredients in your pantry and fridge!

Unfortunately I don’t think I will have the time to be able to work on this, but I thought it might be an interesting idea that someone else could run with.

Optional 1: Have it create a title for the recipe.
Optional 2: Input the amounts of each ingredient so that it has some constraints.

3 Likes

Think this a really cool and creative project idea! Would love to see this project take place! Let’s see if anyone else is interested in joining

@patrickvonplaten, I believe too!

I’ve done something similar using T5 and ByT5 by PyTorch, the results were considerable, but in reality, the recipes were very similar. For instance, the models could understand and generate recipes based on either the ingredients used for warm foods or cold foods. However, the generated recipe for every ingredient (as the basis of warm or cold foods) was approximately the same procedure with different combinations and arrangements in words and steps.

I haven’t tested the GPT (2-3) yet, but I believe that the results might be better than T5 derivatives.

Note: I’ve used two datasets, Recipe NLG provided by Poland University and a custom crawled from Yummly.

I hope this one is considered a potential project. I can share the cleaned dataset crawled from Yummly (~8K food recipes).

would you like to join @m3hrdadfi ? Think this is a cool project and shouldn’t be too time-consuming :slight_smile:

I’m not sure about time management, but I think I can handle it! So, yes, I’d like to join. :blush:

1 Like

Wuhuu! I’ve worked a lot with T5 so in case you want to use this model, I’m sure I can help you as well!

1 Like

That would be perfect!

This looks like a real cool project. Can I join as well?

1 Like

Sure, you are welcome!

1 Like

Task looks interesting, can I join as well?

2 Likes

Sure, happy to have you in this fantastic project!

:bell: I totally forgot to drop an update. I created a channel yesterday on Discord (#recipe-generation) and a public repo (mentioned in the track). After the critical online talks today, we will discuss the aspects of the project and divide the tasks in order to share this awesome model with the world.

1 Like

Awesome, team of 4 now!

3 Likes

I’d like to join-in as well. Joined the discord channel already.

2 Likes