aaronherrera commited on
Commit
6e68247
1 Parent(s): 5957231

Upload app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -51,6 +51,8 @@ def check_food(food, counter):
51
  foodName = food[0]
52
  condition = foodName in cell_obj.value
53
  elif (counter == 3) & (len(food) > 1):
 
 
54
  condition = food[0] in cell_obj.value
55
  else:
56
  break
@@ -78,7 +80,7 @@ def get_cc(food, weight):
78
  counter = 0
79
 
80
  #Try for the most probable match between the prediction and the entries in the database
81
- while (not foodPred) & (counter <= 3):
82
  foodPred, cal, carb, prot, fat = check_food(food,counter)
83
  counter += 1
84
 
 
51
  foodName = food[0]
52
  condition = foodName in cell_obj.value
53
  elif (counter == 3) & (len(food) > 1):
54
+ condition = food[0].capatilize() == cell_obj.value[0:len(food[0]):]
55
+ elif (counter == 4) & (len(food) > 1):
56
  condition = food[0] in cell_obj.value
57
  else:
58
  break
 
80
  counter = 0
81
 
82
  #Try for the most probable match between the prediction and the entries in the database
83
+ while (not foodPred) & (counter <= 4):
84
  foodPred, cal, carb, prot, fat = check_food(food,counter)
85
  counter += 1
86