Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -31,12 +31,10 @@ def detect_fruit(image):
|
|
31 |
result_np_image = cv2.cvtColor(result_np_image, cv2.COLOR_BGR2RGB)
|
32 |
|
33 |
detected_fruit = None
|
34 |
-
|
35 |
-
|
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 |
|
|
|
31 |
result_np_image = cv2.cvtColor(result_np_image, cv2.COLOR_BGR2RGB)
|
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 |
|