m3hrdadfi commited on
Commit
621b43f
1 Parent(s): 1e063fc

Update readme

Browse files
Files changed (1) hide show
  1. README.md +73 -20
README.md CHANGED
@@ -1,33 +1,86 @@
1
- # Recipe Generation Model
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2
 
3
- Give it a list of ingredients (e.g. sugar, flour, egg, peanut butter) and it spits out a recipe (peanut butter cookies).
4
- Useful for when you are trying to use up all those miscellaneous ingredients in your pantry and fridge!
5
 
 
 
 
6
 
7
- ## Data Preparation
8
- For the demo, we use a [lite version](https://huggingface.co/datasets/m3hrdadfi/recipe_nlg_lite) scraped from Yummly, Toriavey, and Skinnytaste.
9
 
 
 
 
 
 
 
 
 
 
 
 
10
 
11
  ```json
12
  {
13
- "description": "we all know how satisfying it is to make great pork tenderloin, ribs, or a roast but the end of the meal creates a new quandary what do you do with the leftover pork contrary to what you might think, it's not that difficult . how to repurpose your meal is where real cooking creativity comes into play, so let us present to you our favorite pork chop soup recipe . with this recipe, you'll discover how the natural bold flavor of pork gives this hearty soup a lift that a vegetable soup or chicken noodle soup just can't get . it's a dinner recipe to warm you up on a cold winter night or a midday restorative for a long work week . throw all the ingredients in a large pot and let it simmer on the stove for a couple hours, or turn it into a slow cooker recipe and let it percolate for an afternoon . this foolproof recipe transforms your favorite comfort food into an easy meal to warm you up again and again . the health benefits of pork pork is a great option if you're on a low carb diet or trying to up your protein intake . the protein percentage of leaner cuts of pork can be as high as 89 percent pork also provides valuable vitamins and minerals that make pork recipes worthy endeavors . pork has high levels of thiamin and niacin, which other types of meat like beef and lamb lack . they are both b vitamins that aid in several body functions such as metabolism and cell function . pork also delivers a healthy amount of zinc, which aids in brain and immune system function . that makes digging into this pork chop noodle soup all the more alluring . recipe variations this pork soup recipe can be adapted to many diets . if you're following a low carb or ketogenic diet, you can modify the recipe to suit you by leaving out the noodles . if you like, you can add a little crunch by topping it with french fried onions . for cheese lovers, a sprinkle of parmesan cheese can give the soup more body and extra umami flavors . if you're not a noodle lover, this soup recipe works equally well as a potato soup with diced potatoes . if you want to make a southwestern or mexican version, add a can of diced tomatoes and bell peppers for a little extra depth . if you have a penchant for spicy soups, add a little chili powder or red pepper flakes . it's up to you this recipe is great for using up leftover pork chops, but you can make this soup using fresh chops however you decide to do it, you won't be disappointed.",
14
- "ingredients": "3.0 bone in pork chops, salt, pepper, 2.0 tablespoon vegetable oil, 2.0 cup chicken broth, 4.0 cup vegetable broth, 1.0 red onion, 4.0 carrots, 2.0 clove garlic, 1.0 teaspoon dried thyme, 0.5 teaspoon dried basil, 1.0 cup rotini pasta, 2.0 stalk celery",
15
- "link": "https://www.yummly.com/private/recipe/Pork-Chop-Noodle-Soup-2249011?layout=prep-steps",
16
- "name": "pork chop noodle soup",
17
- "ner": "bone in pork chops, salt, pepper, vegetable oil, chicken broth, vegetable broth, red onion, carrots, garlic, dried thyme, dried basil, rotini pasta, celery",
18
- "steps": "season pork chops with salt and pepper . heat oil in a dutch oven over medium high heat . add chops and cook for about 4 minutes, until golden brown . flip and cook 4 minutes more, until golden brown . transfer chops to a plate and set aside . pour half of chicken broth into pot, scraping all browned bits from bottom . add remaining chicken broth, vegetable broth, onion, carrots, celery and garlic . mix well and bring to a simmer . add 1 quart water, thyme, basil, 2 teaspoons salt and 1 teaspoon pepper . mix well and bring to a simmer . add chops back to pot and return to simmer . reduce heat and simmer for 90 minutes, stirring occasionally, being careful not to break up chops . transfer chops to plate, trying not to break them up . set aside to cool . raise the heat and bring the soup to a boil . add pasta and cook for about 12 minutes, until tender . when the chops are cool, pull them apart, discarding all the bones and fat . add the meat back to soup and stir well . taste for salt and pepper, and add if needed, before serving.",
19
- "uid": "dab8b7d0-e0f6-4bb0-aed9-346e80dace1f"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
20
  }
21
  ```
22
 
23
- We can consider the ner as the inputs and ingredients followed by steps as our targets like what the `preparaing_recipe_nlg_dataset` does!
24
 
25
- ```text
26
- inputs: bone in pork chops, salt, pepper, vegetable oil, chicken broth, vegetable broth, red onion, carrots, garlic, dried thyme, dried basil, rotini pasta, celery
27
- targets: 3.0 bone in pork chops, salt, pepper, 2.0 tablespoon vegetable oil, 2.0 cup chicken broth, 4.0 cup vegetable broth, 1.0 red onion, 4.0 carrots, 2.0 clove garlic, 1.0 teaspoon dried thyme, 0.5 teaspoon dried basil, 1.0 cup rotini pasta, 2.0 stalk celery<sep>season pork chops with salt and pepper . heat oil in a dutch oven over medium high heat . add chops and cook for about 4 minutes, until golden brown . flip and cook 4 minutes more, until golden brown . transfer chops to a plate and set aside . pour half of chicken broth into pot, scraping all browned bits from bottom . add remaining chicken broth, vegetable broth, onion, carrots, celery and garlic . mix well and bring to a simmer . add 1 quart water, thyme, basil, 2 teaspoons salt and 1 teaspoon pepper . mix well and bring to a simmer . add chops back to pot and return to simmer . reduce heat and simmer for 90 minutes, stirring occasionally, being careful not to break up chops . transfer chops to plate, trying not to break them up . set aside to cool . raise the heat and bring the soup to a boil . add pasta and cook for about 12 minutes, until tender . when the chops are cool, pull them apart, discarding all the bones and fat . add the meat back to soup and stir well . taste for salt and pepper, and add if needed, before serving.
28
- ```
 
 
 
 
 
29
 
30
- ## Training script
31
 
32
- - [run_ed_recipe_nlg.py](src/run_ed_recipe_nlg.py)
33
- - [run.sh](src/run.sh)
 
1
+ ---
2
+ language: en
3
+ tags:
4
+ - seq2seq
5
+ - t5
6
+ - text-generation
7
+ - recipe-generation
8
+ pipeline_tag: text2text-generation
9
+ widget:
10
+ - text: "gold potatoes, olive oil, kosher salt, truffle salt"
11
+ - text: "custard, sage, sugar, milk, heavy cream, eggs, egg yolks, salt, vanilla, maple bourbon caramel sauce, maple syrup, bourbon, sugar, water, light corn syrup, cream of tartar"
12
+ - text: "bulgar wheat, olive oil, cucumber, tomato, lemon, garlic, green onions, fresh mint, salt"
13
+ - text: "active dry yeast, milk, sugar, unsalted butter, chocolate, espresso powder, egg, vanilla, cocoa, salt, bread flour"
14
+ - text: "penne pasta, ground beef, pasta sauce, ricotta cheese, mozzarella cheese, parmesan cheese, egg"
15
+ - text: "fresh strawberries, sugar, vinegar"
16
+ - text: "soy sauce, lime juice, apricot preserves, water, garlic, ground ginger, carrots, green onions, olive oil, shrimp, sweet red pepper, rice, lettuce leaves"
17
+ - text: "cucumbers, lemon juice, parsley, water, onion, sour cream, black pepper, salt"
18
+ - text: "chicken breasts, onion, garlic, great northern beans, black beans, green chilies, broccoli, garlic oil, butter, cajun seasoning, salt, oregano, thyme, black pepper, basil, worcestershire sauce, chicken broth, sour cream, chardonnay wine"
19
+ - text: "serrano peppers, garlic, celery, oregano, canola oil, vinegar, water, kosher salt, salt, black pepper"
20
 
21
+ ---
 
22
 
23
+ # T5 Recipe Generation
24
+ > This is part of the
25
+ [Flax/Jax Community Week](https://discuss.huggingface.co/t/recipe-generation-model/7475), organized by [HuggingFace](https://huggingface.co/) and TPU usage sponsored by Google.
26
 
27
+ ... SOON
 
28
 
29
+ ## Team Members
30
+ - Mehrdad Farahani ([m3hrdadfi](https://huggingface.co/m3hrdadfi))
31
+ - Nicholas Broad ([m3hrdadfi](https://huggingface.co/nbroad))
32
+ - Deepak Pandian ([rays2pix](https://huggingface.co/rays2pix))
33
+ - Kartik Godawat ([m3hrdadfi](https://huggingface.co/dk-crazydiv))
34
+
35
+ ## Dataset
36
+
37
+ [RecipeNLG: A Cooking Recipes Dataset for Semi-Structured Text Generation](https://recipenlg.cs.put.poznan.pl/). This dataset contains **2,231,142** cooking recipes (>2 millions) with size of **2.14 GB**. It's processed in more careful way and provides more samples than any other dataset in the area.
38
+
39
+ ### Example
40
 
41
  ```json
42
  {
43
+ "NER": [
44
+ "oyster crackers",
45
+ "salad dressing",
46
+ "lemon pepper",
47
+ "dill weed",
48
+ "garlic powder",
49
+ "salad oil"
50
+ ],
51
+ "directions": [
52
+ "Combine salad dressing mix and oil.",
53
+ "Add dill weed, garlic powder and lemon pepper.",
54
+ "Pour over crackers; stir to coat.",
55
+ "Place in warm oven.",
56
+ "Use very low temperature for 15 to 20 minutes."
57
+ ],
58
+ "ingredients": [
59
+ "12 to 16 oz. plain oyster crackers",
60
+ "1 pkg. Hidden Valley Ranch salad dressing mix",
61
+ "1/4 tsp. lemon pepper",
62
+ "1/2 to 1 tsp. dill weed",
63
+ "1/4 tsp. garlic powder",
64
+ "3/4 to 1 c. salad oil"
65
+ ],
66
+ "link": "www.cookbooks.com/Recipe-Details.aspx?id=648947",
67
+ "source": "Gathered",
68
+ "title": "Hidden Valley Ranch Oyster Crackers"
69
  }
70
  ```
71
 
72
+ ## How To Use
73
 
74
+ ... SOON
75
+
76
+ ## Evaluation
77
+
78
+ ... SOON
79
+
80
+ ### Baseline
81
+
82
+ ... SOON
83
 
84
+ ### Our Results
85
 
86
+ ... SOON