gatesla commited on
Commit
e8c59cf
·
1 Parent(s): 97292af

Conversion error?

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -85,7 +85,7 @@ def detect_objects(model_name,url_input,image_input,threshold):
85
  # r = box.xyxy[0].astype(int)
86
  coordinates = box.xyxy[0].astype(int)
87
  label = YOLOV8_LABELS[box.cls]
88
- confi = box.conf
89
  # final_str_abv += str() + "__" + str(box.cls) + "__" + str(box.conf) + "__" + str(box) + "\n"
90
  if confi >= threshold:
91
  final_str_abv += f"Detected `{label}` with confidence `{confi}` at location `{coordinates}`\n"
 
85
  # r = box.xyxy[0].astype(int)
86
  coordinates = box.xyxy[0].astype(int)
87
  label = YOLOV8_LABELS[box.cls]
88
+ confi = float(box.conf)
89
  # final_str_abv += str() + "__" + str(box.cls) + "__" + str(box.conf) + "__" + str(box) + "\n"
90
  if confi >= threshold:
91
  final_str_abv += f"Detected `{label}` with confidence `{confi}` at location `{coordinates}`\n"