wickedreg commited on
Commit
4546572
1 Parent(s): d7fbded

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -32,9 +32,11 @@ def detect_fruit(image):
32
 
33
  detected_fruit = None
34
 
35
- label = model.names[int(det[5])] # название фрукта
 
36
  if label in fruits_data:
37
  detected_fruit = label
 
38
 
39
  return result_np_image, detected_fruit
40
 
 
32
 
33
  detected_fruit = None
34
 
35
+ for det in detections:
36
+ label = model.names[int(det[5])] # название фрукта
37
  if label in fruits_data:
38
  detected_fruit = label
39
+ break
40
 
41
  return result_np_image, detected_fruit
42