agung mofdac commited on
Commit
9479319
1 Parent(s): 9e972a3

Update Classification_And_Recipes.py

Browse files
Files changed (1) hide show
  1. Classification_And_Recipes.py +6 -5
Classification_And_Recipes.py CHANGED
@@ -122,7 +122,8 @@ def main():
122
  diet = st.selectbox('Diet', diet_options)
123
 
124
  # Dropdown for Cuisine
125
- cuisine_options = ['All', 'African', 'Asian', 'Caribbean', 'Central American', 'Europe', 'Middle Eastern', 'North American', 'Oceanic', 'South American']
 
126
 
127
  cuisine = st.selectbox('Cuisine', cuisine_options)
128
 
@@ -135,11 +136,11 @@ def main():
135
  url = "https://alcksyjrmd.execute-api.us-east-2.amazonaws.com/default/nutrients_response"
136
 
137
  # Dropdown for Cuisine
138
- cuisine_category = ['Bread', 'Dairy', 'Dessert', 'Egg', 'Fried', 'Fruit', 'Meat', 'Noodles', 'Rice','Seafood','Soup','Vegetable']
139
- label_num = st.selectbox('Cuisine Type', cuisine_category)
140
- category = ("Bread" if label_num==0 else "Dairy" if label_num==1 else "Dessert" if label_num==2 else "Egg" if label_num==3 else "Fried" if label_num==4 else "Fruit" if label_num==5 else "Meat" if label_num==6 else "Noodles" if label_num==7 else "Rice" if label_num==8 else "Seafood" if label_num==9 else "**Soup**" if label_num==10 else "Vegetable")
141
 
142
- params = {"f": category, "k": str(calories)}
143
 
144
  if diet != "All":
145
  params["d"] = diet
 
122
  diet = st.selectbox('Diet', diet_options)
123
 
124
  # Dropdown for Cuisine
125
+ # cuisine_options = ['All', 'African', 'Asian', 'Caribbean', 'Central American', 'Europe', 'Middle Eastern', 'North American', 'Oceanic', 'South American']
126
+ cuisine_options = ['All', 'Asian', 'Central American', 'Europe', 'Middle Eastern']
127
 
128
  cuisine = st.selectbox('Cuisine', cuisine_options)
129
 
 
136
  url = "https://alcksyjrmd.execute-api.us-east-2.amazonaws.com/default/nutrients_response"
137
 
138
  # Dropdown for Cuisine
139
+ category = ['Bread', 'Dairy', 'Dessert', 'Egg', 'Fried', 'Fruit', 'Meat', 'Noodles', 'Rice','Seafood','Soup','Vegetable']
140
+ # label_num = st.selectbox('Cuisine Type', cuisine_category)
141
+ # category = ("Bread" if label_num==0 else "Dairy" if label_num==1 else "Dessert" if label_num==2 else "Egg" if label_num==3 else "Fried" if label_num==4 else "Fruit" if label_num==5 else "Meat" if label_num==6 else "Noodles" if label_num==7 else "Rice" if label_num==8 else "Seafood" if label_num==9 else "**Soup**" if label_num==10 else "Vegetable")
142
 
143
+ params = {"f": category[-1], "k": str(calories)}
144
 
145
  if diet != "All":
146
  params["d"] = diet