Spaces:
Sleeping
Sleeping
OmPrakashSingh1704
commited on
Commit
•
d91b034
1
Parent(s):
2590d8a
Update app.py
Browse files
app.py
CHANGED
@@ -157,19 +157,21 @@ def clear_inputs():
|
|
157 |
|
158 |
|
159 |
st.title("Let's get cooking")
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
|
|
|
|
173 |
|
174 |
difficulty_dictionary = {
|
175 |
"Quick & Easy": {
|
@@ -185,7 +187,16 @@ difficulty_dictionary = {
|
|
185 |
|
186 |
st.session_state.selected_difficulty = st.radio(
|
187 |
"Choose a difficulty level for your recipe.",
|
188 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
189 |
index=list(difficulty_dictionary).index(st.session_state.selected_difficulty)
|
190 |
)
|
191 |
|
|
|
157 |
|
158 |
|
159 |
st.title("Let's get cooking")
|
160 |
+
col1,col2=st.columns(2)
|
161 |
+
with col1:
|
162 |
+
st.session_state.user_direction = st.text_area(
|
163 |
+
"What do you want to cook? Describe anything - a dish, cuisine, event, or vibe.",
|
164 |
+
value=st.session_state.user_direction,
|
165 |
+
placeholder="quick snack, asian style bowl with either noodles or rice, something italian",
|
166 |
+
)
|
167 |
+
with col2:
|
168 |
+
st.session_state.serving_size = st.number_input(
|
169 |
+
"How many servings would you like to cook?",
|
170 |
+
min_value=1,
|
171 |
+
max_value=100,
|
172 |
+
value=st.session_state.serving_size,
|
173 |
+
step=1
|
174 |
+
)
|
175 |
|
176 |
difficulty_dictionary = {
|
177 |
"Quick & Easy": {
|
|
|
187 |
|
188 |
st.session_state.selected_difficulty = st.radio(
|
189 |
"Choose a difficulty level for your recipe.",
|
190 |
+
[
|
191 |
+
list(difficulty_dictionary.keys())[0],
|
192 |
+
list(difficulty_dictionary.keys())[1],
|
193 |
+
list(difficulty_dictionary.keys())[2]
|
194 |
+
],
|
195 |
+
captions=[
|
196 |
+
difficulty_dictionary["Quick & Easy"]["description"],
|
197 |
+
difficulty_dictionary["Intermediate"]["description"],
|
198 |
+
difficulty_dictionary["Professional"]["description"]
|
199 |
+
],
|
200 |
index=list(difficulty_dictionary).index(st.session_state.selected_difficulty)
|
201 |
)
|
202 |
|