Kaludi commited on
Commit
065446a
1 Parent(s): 9585bd1

Rename pages/Ingredients_By_Recipe.py to pages/Recipe_By_Ingredients_.py

Browse files
pages/{Ingredients_By_Recipe.py → Recipe_By_Ingredients_.py} RENAMED
@@ -15,7 +15,7 @@ st.markdown("Get food recipes based on user input. Users can input the type of f
15
  url = "https://alcksyjrmd.execute-api.us-east-2.amazonaws.com/default/nutrients_response"
16
 
17
  # Get user input
18
- ingredients = st.text_input("Enter a comma-separated list of ingredients")
19
 
20
  # Set default values for optional parameters
21
  max_calories = 0
@@ -28,7 +28,10 @@ diet_options = ["All", "Gluten-Free", "Vegan", "Vegetarian", "Dairy-Free"]
28
  diet = st.selectbox("Select a diet", diet_options)
29
  cuisine_options = ["All", "African", "Asian", "Caribbean", "Central American", "Europe", "Middle Eastern", "North American", "Oceanic", "South American"]
30
  cuisine = st.selectbox("Select a cuisine", cuisine_options)
31
- if st.button("Get Recipe"):
 
 
 
32
  # Set the parameters for the API request
33
  params = {"i": ingredients}
34
 
 
15
  url = "https://alcksyjrmd.execute-api.us-east-2.amazonaws.com/default/nutrients_response"
16
 
17
  # Get user input
18
+ ingredients = st.text_input("Enter ingredients (Separated By Commas)", placeholder="Enter Atleast One Ingredient", value="")
19
 
20
  # Set default values for optional parameters
21
  max_calories = 0
 
28
  diet = st.selectbox("Select a diet", diet_options)
29
  cuisine_options = ["All", "African", "Asian", "Caribbean", "Central American", "Europe", "Middle Eastern", "North American", "Oceanic", "South American"]
30
  cuisine = st.selectbox("Select a cuisine", cuisine_options)
31
+ if ingredients == "":
32
+ st.warning("Please enter at least one ingredient.")
33
+ elif st.button("Get Recipe"):
34
+
35
  # Set the parameters for the API request
36
  params = {"i": ingredients}
37