File size: 3,312 Bytes
025b08b
ac6bfa9
025b08b
 
 
 
 
 
 
 
 
 
716e1fe
 
ac6bfa9
 
025b08b
5849dd5
 
 
 
 
 
 
 
 
 
716e1fe
5849dd5
 
 
025b08b
716e1fe
025b08b
 
5849dd5
 
025b08b
5849dd5
eeaa412
5849dd5
 
 
 
 
 
 
 
 
 
 
eeaa412
5849dd5
716e1fe
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
HEADER_INFO = """""".strip()
SIDEBAR_INFO = """
<div class="contributors">
<a class="contributor comma" href="https://huggingface.co/m3hrdadfi">Mehrdad Farahani</a>
<a class="contributor comma" href="https://huggingface.co/dk-crazydiv">Kartik Godawat</a>
<a class="contributor comma" href="https://huggingface.co/hassiahk">Haswanth Aekula</a>
<a class="contributor comma" href="https://huggingface.co/rays2pix">Deepak Pandian</a>
<a class="contributor comma" href="https://huggingface.co/nbroad">Nicholas Broad</a>
</div>
"""
CHEF_INFO = """
<p class="strong">Welcome to our lovely restaurant! 
<span class="d-block extra-info">(We are at your service with two of the best chefs in the world: Chef Scheherazade, 
Chef Giovanni. Scheherazade is known for being more creative whereas Giovanni is more meticulous.)</span></p>
""".strip()
PROMPT_BOX = "Add custom ingredients here (separated by `,`): "
STORY = """
<div class="story-box">
<p>
Hello everyone πŸ‘‹, I am <strong>Chef Transformer</strong>, 
the owner of this restaurant. I was made by a group of <a href="https://huggingface.co/flax-community/t5-recipe-generation#team-members">NLP Engineers</a> to train my two prodigy recipe creators: <strong>Chef Scheherazade</strong> and <strong>Chef Giovanni</strong>. 
Both of my students participated in my rigorous culinary program, <a href="https://huggingface.co/flax-community/t5-recipe-generation">T5 fine-tune training</a>, 
to learn how to prepare exquisite cuisines from a wide variety of ingredients. 
I've never been more proud of my students -- both can produce exceptional dishes but I regard Scheherazade as being <em>creative</em> while Giovanni is <em>meticulous</em>. 
If you give each of them the same ingredients, they'll usually come up with something different. <br /><br />
At the start of the program the chefs read cookbooks containing thousands of recipes of varying difficulties and from cultures all over the world. 
The NLP engineers helped guide the learning process so that the chefs could actually learn which ingredients work well together rather than just memorize recipes. 
I trained my chefs by asking them to generate a title, a list of ingredients (including amounts!), and a list of directions after giving them just a simple list of food items. 
</p>

<pre>
[Input]
    {food items*: separated by comma}
     
[Targets]
    title: {TITLE} <section>
    ingredients: {INGREDIENTS: separated by <sep>} <section>
    directions: {DIRECTIONS: separated by <sep>}.
</pre>

<p>
  <em>In the cookbooks (a.k.a <a href="https://huggingface.co/datasets/recipe_nlg">dataset</a>), the food items were referred to as NER. </em>
</p>
<p>
In the span of a week, my chefs went from spitting out nonsense to creating masterpieces. 
Their learning rate was exceptionally high and each batch of recipes was better than the last. <br />
In their final exam, they achieved <a href="https://huggingface.co/flax-community/t5-recipe-generation#evaluation">high scores</a> πŸ’― in a 
standardized industry test and established this restaurant 🍲. Please tell your friends and family about us! 
We create each recipe with a smile on our faces πŸ€— Everyone at the restaurant is grateful for the generous support of 
HuggingFace and Google for hosting Flax Community week. 
</p>

</div>
""".strip()