Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -28,6 +28,9 @@ def predict(pilimg):
|
|
28 |
source = pilimg
|
29 |
# x = np.asarray(pilimg)
|
30 |
# print(x.shape)
|
|
|
|
|
|
|
31 |
result = detection_model.predict(source, conf=0.4, iou=0.6) # confidence threshold, intersection over union threshold
|
32 |
|
33 |
#print("Result: ", result)
|
@@ -40,7 +43,7 @@ def predict(pilimg):
|
|
40 |
return out_pilimg
|
41 |
|
42 |
REPO_ID = "ITI107-2024S2/8035531F" # The repo ID of the model
|
43 |
-
detection_model = load_model(REPO_ID)
|
44 |
|
45 |
title = "Detect Durian and Mangosteen (King and Queen of Fruits) In The Image"
|
46 |
interface = gr.Interface(
|
|
|
28 |
source = pilimg
|
29 |
# x = np.asarray(pilimg)
|
30 |
# print(x.shape)
|
31 |
+
|
32 |
+
detection_model = YOLO(best_yolo_model, task='detect')# load the model
|
33 |
+
|
34 |
result = detection_model.predict(source, conf=0.4, iou=0.6) # confidence threshold, intersection over union threshold
|
35 |
|
36 |
#print("Result: ", result)
|
|
|
43 |
return out_pilimg
|
44 |
|
45 |
REPO_ID = "ITI107-2024S2/8035531F" # The repo ID of the model
|
46 |
+
#detection_model = load_model(REPO_ID)
|
47 |
|
48 |
title = "Detect Durian and Mangosteen (King and Queen of Fruits) In The Image"
|
49 |
interface = gr.Interface(
|