Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -15,7 +15,7 @@ def load_model(repo_id):
|
|
15 |
|
16 |
def predict(pil_img, conf_thresh, iou_thresh):
|
17 |
source = pil_img
|
18 |
-
results = detection_model.predict(source conf=conf_thresh, iou=iou_thresh)
|
19 |
annotated_img = results[0].plot()
|
20 |
return Image.fromarray(annotated_img[..., ::-1]) # Convert BGR to RGB
|
21 |
|
|
|
15 |
|
16 |
def predict(pil_img, conf_thresh, iou_thresh):
|
17 |
source = pil_img
|
18 |
+
results = detection_model.predict(source, conf=conf_thresh, iou=iou_thresh)
|
19 |
annotated_img = results[0].plot()
|
20 |
return Image.fromarray(annotated_img[..., ::-1]) # Convert BGR to RGB
|
21 |
|