Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -27,7 +27,7 @@ def predict(model, image, detection_threshold: float = 0.5):
|
|
| 27 |
def show_preds(input_image, detection_threshold):
|
| 28 |
if detection_threshold==0: detection_threshold=0.5
|
| 29 |
|
| 30 |
-
img, pred = predict(model=model, image=input_image, detection_threshold)
|
| 31 |
# print(pred)
|
| 32 |
img = draw_pred(img=img, pred=pred, class_map=class_map, display_label=False, display_bbox=True)
|
| 33 |
img = PIL.Image.fromarray(img)
|
|
|
|
| 27 |
def show_preds(input_image, detection_threshold):
|
| 28 |
if detection_threshold==0: detection_threshold=0.5
|
| 29 |
|
| 30 |
+
img, pred = predict(model=model, image=input_image, detection_threshold=detection_threshold)
|
| 31 |
# print(pred)
|
| 32 |
img = draw_pred(img=img, pred=pred, class_map=class_map, display_label=False, display_bbox=True)
|
| 33 |
img = PIL.Image.fromarray(img)
|