adrianpierce commited on
Commit
d13aa0b
1 Parent(s): 296eb14

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +11 -2
app.py CHANGED
@@ -57,14 +57,23 @@ exclusions = st.text_area(
57
  placeholder="gluten, dairy, nuts, cilantro",
58
  )
59
 
 
 
 
 
 
 
 
 
 
60
  user_inputs = {
61
  "user_direction" : user_direction,
62
- "exclusions": exclusions,
63
  "serving_size": serving_size,
64
  "difficulty": selected_difficulty
65
  }
66
 
67
- def create_detailed_prompt(user_direction, exclusions, serving_size, difficulty):
68
  if difficulty == "Quick and Easy":
69
  prompt = (
70
  f"Please provide a 'Quick and Easy' recipe for {user_direction} with a serving size of {serving_size}. "
 
57
  placeholder="gluten, dairy, nuts, cilantro",
58
  )
59
 
60
+ fancy_exclusions =""
61
+
62
+ if selected_difficulty == "Professional":
63
+ exclude_fancy = st.checkbox(
64
+ "Exclude cliche professional ingredients? (gold leaf, truffle)",
65
+ value=True)
66
+ fancy_exclusions = "gold leaf, truffle"
67
+
68
+
69
  user_inputs = {
70
  "user_direction" : user_direction,
71
+ "exclusions": f"{exclusions}, {fancy_exclusions}",
72
  "serving_size": serving_size,
73
  "difficulty": selected_difficulty
74
  }
75
 
76
+ def create_detailed_prompt(user_inputs['user_direction'], user_inputs['exclusions'], user_inputs['serving_size'], user_inputs['difficulty']):
77
  if difficulty == "Quick and Easy":
78
  prompt = (
79
  f"Please provide a 'Quick and Easy' recipe for {user_direction} with a serving size of {serving_size}. "