Spaces:
Sleeping
Sleeping
adrianpierce
commited on
Commit
•
763e0c3
1
Parent(s):
1481d5a
Update app.py
Browse files
app.py
CHANGED
@@ -25,14 +25,34 @@ serving_size = st.number_input(
|
|
25 |
step=1
|
26 |
)
|
27 |
|
28 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
29 |
"Choose a difficulty level for your recipe.",
|
30 |
-
[
|
|
|
|
|
|
|
|
|
31 |
captions = [
|
32 |
-
"
|
33 |
-
"
|
34 |
-
"
|
35 |
-
]
|
|
|
36 |
|
37 |
exclusions = st.text_area(
|
38 |
"Any ingredients you want to exclude?",
|
@@ -43,7 +63,7 @@ user_inputs = {
|
|
43 |
"user_direction" : user_direction,
|
44 |
"exclusions": exclusions,
|
45 |
"serving_size": serving_size,
|
46 |
-
"difficulty":
|
47 |
}
|
48 |
|
49 |
|
|
|
25 |
step=1
|
26 |
)
|
27 |
|
28 |
+
difficulty_dictionary = {
|
29 |
+
"Quick & Easy": {
|
30 |
+
"description": "Easy recipes with straightforward instructions. Ideal for beginners or those seeking quick and simple cooking.",
|
31 |
+
"gpt_instruction": "a quick and easy recipe with simple/straightfoward ingredients and instructions."
|
32 |
+
}
|
33 |
+
"Intermediate": {
|
34 |
+
"description": "Recipes with some intricate steps that invite a little challenge. Perfect for regular cooks wanting to expand their repertoire with new ingredients and techniques.",
|
35 |
+
"gpt_instruction": "intermediate recipe with some intricate ingredients and instructional steps."
|
36 |
+
}
|
37 |
+
"Professional": {
|
38 |
+
"description": "Complex recipes that demand a high level of skill and precision. Suited for seasoned cooks aspiring to professional-level sophistication and creativity.",
|
39 |
+
"gpt_instruction": "restaurant quality dish that is innovative and even experimental. may use a variety of ingredients and techniques."
|
40 |
+
}
|
41 |
+
}
|
42 |
+
|
43 |
+
selected_difficulty = st.radio(
|
44 |
"Choose a difficulty level for your recipe.",
|
45 |
+
[
|
46 |
+
difficulty_dictionary[0],
|
47 |
+
difficulty_dictionary[1],
|
48 |
+
difficulty_dictionary[2]
|
49 |
+
],
|
50 |
captions = [
|
51 |
+
difficulty_dictionary["Quick & Easy"]["description"],
|
52 |
+
difficulty_dictionary["Intermediate"]["description"],
|
53 |
+
difficulty_dictionary["Professional"]["description"]
|
54 |
+
]
|
55 |
+
)
|
56 |
|
57 |
exclusions = st.text_area(
|
58 |
"Any ingredients you want to exclude?",
|
|
|
63 |
"user_direction" : user_direction,
|
64 |
"exclusions": exclusions,
|
65 |
"serving_size": serving_size,
|
66 |
+
"difficulty": difficulty_dictionary['selected_difficulty']['gpt_instruction']
|
67 |
}
|
68 |
|
69 |
|