dindizz commited on
Commit
d3d1e0b
·
verified ·
1 Parent(s): f9fd135

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +16 -0
app.py CHANGED
@@ -56,6 +56,22 @@ nutritional_data = {
56
  }
57
  }
58
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
59
  def optimize_dishes_for_budget(city, daily_budget):
60
  # Extracting cost, calories, and protein data for the selected city
61
  costs = [nutritional_data[dish][city] for dish in nutritional_data]
 
56
  }
57
  }
58
 
59
+ def display_dishes_in_city(city):
60
+ """Displays all dishes available in the selected city with their nutritional information and cost."""
61
+ result_str = f"### Available Dishes in {city} (Data pulled from leading food aggregators):\n"
62
+ for dish, info in nutritional_data.items():
63
+ result_str += f"- **{dish}**\n"
64
+ result_str += f" - Cost: ₹{info[city]}\n"
65
+ result_str += f" - Energy: {info['Energy (kcal)']} kcal\n"
66
+ result_str += f" - Protein: {info['Protein (g)']} g\n"
67
+ result_str += f" - Fat: {info['Fat (g)']} g\n"
68
+ result_str += f" - Carbohydrate: {info['Carbohydrate (g)']} g\n"
69
+ result_str += f" - Fiber: {info['Fiber (g)']} g\n"
70
+ result_str += f" - Calcium: {info['Calcium (mg)']} mg\n"
71
+ result_str += f" - Iron: {info['Iron (mg)']} mg\n"
72
+ result_str += f" - Vitamin C: {info['Vitamin C (mg)']} mg\n\n"
73
+ return result_str
74
+
75
  def optimize_dishes_for_budget(city, daily_budget):
76
  # Extracting cost, calories, and protein data for the selected city
77
  costs = [nutritional_data[dish][city] for dish in nutritional_data]