rabbylux commited on
Commit
4e7ac3f
1 Parent(s): 2f3a843

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -87,9 +87,9 @@ if allergens:
87
  # Create pie charts for each nutritional metric in 3x2 grid
88
  # If they are multi selections, each product will contribute proportion in the pie chart
89
  metrics = ['Total Energy (Kcal)', 'Carbohydrate (g)', 'Protein (g)', 'Total Fat (g)', 'Sodium (g)', 'Sugar (g)']
90
- for i in range(0, len(metrics), 3):
91
- cols = st.columns(3) # Define three columns
92
- for j in range(3):
93
  if i + j < len(metrics): # Check if the current index is within the metrics array
94
  with cols[j]:
95
  metric = metrics[i + j]
 
87
  # Create pie charts for each nutritional metric in 3x2 grid
88
  # If they are multi selections, each product will contribute proportion in the pie chart
89
  metrics = ['Total Energy (Kcal)', 'Carbohydrate (g)', 'Protein (g)', 'Total Fat (g)', 'Sodium (g)', 'Sugar (g)']
90
+ for i in range(0, len(metrics), 2):
91
+ cols = st.columns(2) # Define three columns
92
+ for j in range(2):
93
  if i + j < len(metrics): # Check if the current index is within the metrics array
94
  with cols[j]:
95
  metric = metrics[i + j]