nightey3s commited on
Commit
2a2bae3
·
verified ·
1 Parent(s): a5bf59d

Update cal.py

Browse files
Files changed (1) hide show
  1. cal.py +62 -5
cal.py CHANGED
@@ -9,12 +9,23 @@ import streamlit as st
9
  # Configuration class
10
  class Config:
11
 
12
- CLASSES = ['asparagus', 'avocados', 'broccoli', 'cabbage',
13
- 'celery', 'cucumber', 'green_apples',
14
- 'green_beans', 'green_capsicum', 'green_grapes', 'kiwifruit',
15
- 'lettuce', 'limes', 'peas', 'spinach']
 
 
 
 
 
 
 
 
 
 
16
 
17
  CALORIES_DICT = {
 
18
  'asparagus': 20,
19
  'avocados': 160,
20
  'broccoli': 55,
@@ -29,7 +40,53 @@ class Config:
29
  'lettuce': 15,
30
  'limes': 30,
31
  'peas': 81,
32
- 'spinach': 23
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
33
  }
34
 
35
  # Load the model
 
9
  # Configuration class
10
  class Config:
11
 
12
+ CLASSES = ['asparagus', 'avocados', 'broccoli', 'cabbage', #4
13
+ 'celery', 'cucumber', 'green_apples', 'green_beans', #4
14
+ 'green_capsicum', 'green_grapes', 'kiwifruit', #3
15
+ 'lettuce', 'limes', 'peas', 'spinach', #4
16
+ 'Banana', 'Cauliflower', 'Date', 'Garlic', #4
17
+ 'Ginger', 'Mushroom', 'Onion', 'Parsnip', #4
18
+ 'Peach', 'Pear', 'Potato', 'Turnip', #4
19
+ 'Beetroot', 'Blackberry', 'Blueberry', 'Cherry', #4
20
+ 'Eggplant', 'Plum', 'Purple asparagus', 'Purple grapes', #4
21
+ 'Radish', 'Raspberry', 'Red Apple', 'Red Grape', #4
22
+ 'Red cabbage', 'Red capsicum', 'Strawberry', 'Tomato', #4
23
+ 'Watermelon', 'apricot', 'carrot', 'corn', #4
24
+ 'grapefruit', 'lemon', 'mango', 'nectarine', #4
25
+ 'orange', 'pineapple', 'pumpkin', 'sweet_potato'] #4
26
 
27
  CALORIES_DICT = {
28
+ # Green foods (existing)
29
  'asparagus': 20,
30
  'avocados': 160,
31
  'broccoli': 55,
 
40
  'lettuce': 15,
41
  'limes': 30,
42
  'peas': 81,
43
+ 'spinach': 23,
44
+
45
+ # White/Beige foods
46
+ 'Banana': 89,
47
+ 'Cauliflower': 25,
48
+ 'Date': 282,
49
+ 'Garlic': 149,
50
+ 'Ginger': 80,
51
+ 'Mushroom': 22,
52
+ 'Onion': 40,
53
+ 'Parsnip': 75,
54
+ 'Peach': 39,
55
+ 'Pear': 57,
56
+ 'Potato': 77,
57
+ 'Turnip': 28,
58
+
59
+ # Purple/Red foods
60
+ 'Beetroot': 43,
61
+ 'Blackberry': 43,
62
+ 'Blueberry': 57,
63
+ 'Cherry': 50,
64
+ 'Eggplant': 25,
65
+ 'Plum': 46,
66
+ 'Purple asparagus': 20,
67
+ 'Purple grapes': 69,
68
+ 'Radish': 16,
69
+ 'Raspberry': 52,
70
+ 'Red Apple': 52,
71
+ 'Red Grape': 69,
72
+ 'Red cabbage': 31,
73
+ 'Red capsicum': 31,
74
+ 'Strawberry': 32,
75
+ 'Tomato': 18,
76
+ 'Watermelon': 30,
77
+
78
+ # Orange/Yellow foods
79
+ 'apricot': 48,
80
+ 'carrot': 41,
81
+ 'corn': 86,
82
+ 'grapefruit': 42,
83
+ 'lemon': 29,
84
+ 'mango': 60,
85
+ 'nectarine': 44,
86
+ 'orange': 47,
87
+ 'pineapple': 50,
88
+ 'pumpkin': 26,
89
+ 'sweet_potato': 86
90
  }
91
 
92
  # Load the model