Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -7,7 +7,6 @@ import os
|
|
7 |
|
8 |
model_path = "best_int8_openvino_model"
|
9 |
|
10 |
-
|
11 |
# Example paths for Gradio
|
12 |
image_examples = [["DurianMangosteen1.jpg"], ["DurianMangosteen2.jpg"]]
|
13 |
|
@@ -26,9 +25,7 @@ def predict(pilimg):
|
|
26 |
source = pilimg
|
27 |
# x = np.asarray(pilimg)
|
28 |
# print(x.shape)
|
29 |
-
|
30 |
-
detection_model = YOLO(best_yolo_model, task='detect')# load the model
|
31 |
-
|
32 |
result = detection_model.predict(source, conf=0.4, iou=0.6) # confidence threshold, intersection over union threshold
|
33 |
|
34 |
#print("Result: ", result)
|
|
|
7 |
|
8 |
model_path = "best_int8_openvino_model"
|
9 |
|
|
|
10 |
# Example paths for Gradio
|
11 |
image_examples = [["DurianMangosteen1.jpg"], ["DurianMangosteen2.jpg"]]
|
12 |
|
|
|
25 |
source = pilimg
|
26 |
# x = np.asarray(pilimg)
|
27 |
# print(x.shape)
|
28 |
+
|
|
|
|
|
29 |
result = detection_model.predict(source, conf=0.4, iou=0.6) # confidence threshold, intersection over union threshold
|
30 |
|
31 |
#print("Result: ", result)
|