OmPrakashSingh1704 commited on
Commit
d91b034
1 Parent(s): 2590d8a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +25 -14
app.py CHANGED
@@ -157,19 +157,21 @@ def clear_inputs():
157
 
158
 
159
  st.title("Let's get cooking")
160
- st.session_state.user_direction = st.text_area(
161
- "What do you want to cook? Describe anything - a dish, cuisine, event, or vibe.",
162
- value=st.session_state.user_direction,
163
- placeholder="quick snack, asian style bowl with either noodles or rice, something italian",
164
- )
165
-
166
- st.session_state.serving_size = st.number_input(
167
- "How many servings would you like to cook?",
168
- min_value=1,
169
- max_value=100,
170
- value=st.session_state.serving_size,
171
- step=1
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
- list(difficulty_dictionary.keys()),
 
 
 
 
 
 
 
 
 
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