lydiazyang commited on
Commit
0013931
·
1 Parent(s): f35e44d

Commented out updated ingredients list

Browse files
Files changed (1) hide show
  1. index.py +4 -3
index.py CHANGED
@@ -69,7 +69,7 @@ def main():
69
  cap.release()
70
  if session_state['ingredientsList']:
71
  session_state['ingredientsList'].pop()
72
- st.write("Updated Ingredients List:", session_state['ingredientsList'])
73
 
74
  displayRecipes(session_state['ingredientsList'])
75
  # Define content for each item
@@ -90,10 +90,11 @@ def displayRecipes(ingredientsList):
90
  Ingredients? Give me A list of detailed recipes with measurements containing these ingredients with Nutrition Facts per 100g based on the widely accepted nutritional value of each of these ingredients. Rank the list from \
91
  highest nutritional value to lowest. Give me results in \
92
  following format and do not deviate from this format:\
93
- ['Recipe title', 'content of recipe and nutritional facts per 100g']. Only give me the list. Do not add commentary or personalized responses."
 
94
  LLMResult = askGPT(prompt)
95
  lystOfRecipes = LLMResult.split('\n\n')
96
- print(lystOfRecipes)
97
  for recipe in range(1,len(lystOfRecipes)-1):
98
  items.append({"title": lystOfRecipes[recipe].split(":")[0], "content": ""})
99
  # Display the items with =expanding boxes
 
69
  cap.release()
70
  if session_state['ingredientsList']:
71
  session_state['ingredientsList'].pop()
72
+ #st.write("Updated Ingredients List:", session_state['ingredientsList'])
73
 
74
  displayRecipes(session_state['ingredientsList'])
75
  # Define content for each item
 
90
  Ingredients? Give me A list of detailed recipes with measurements containing these ingredients with Nutrition Facts per 100g based on the widely accepted nutritional value of each of these ingredients. Rank the list from \
91
  highest nutritional value to lowest. Give me results in \
92
  following format and do not deviate from this format:\
93
+ ['Recipe title', 'content of recipe and nutritional facts per 100g']. Only give me the list. Do not add commentary or personalized responses. Keep it under 200 words."
94
+ #prompt = f"You are going to act as a nutritional expert who has a lot of knowledge about food. I have the following ingredients: {','.join(ingredientsList)}. What can I make with these ingredients? Give me a list of names of recipes, maximum five."
95
  LLMResult = askGPT(prompt)
96
  lystOfRecipes = LLMResult.split('\n\n')
97
+ # print(lystOfRecipes)
98
  for recipe in range(1,len(lystOfRecipes)-1):
99
  items.append({"title": lystOfRecipes[recipe].split(":")[0], "content": ""})
100
  # Display the items with =expanding boxes