olive100 commited on
Commit
fe572ca
·
1 Parent(s): b440a5c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -17,8 +17,8 @@ def detect(img):
17
  img = get_url_img(img) if img.startswith('http') else Image.open(img).convert('RGB')
18
  result = model.predict(source=img)
19
  print(result)
20
- if len(result[0].boxes)>0:
21
- vis = plots.plot_detection(img,boxes=result[0].boxes,
22
  class_names=class_names, min_score=0.2)
23
  else:
24
  vis = img
 
17
  img = get_url_img(img) if img.startswith('http') else Image.open(img).convert('RGB')
18
  result = model.predict(source=img)
19
  print(result)
20
+ if len(result[0].boxes.data)>0:
21
+ vis = plots.plot_detection(img,boxes=result[0].boxes.data,
22
  class_names=class_names, min_score=0.2)
23
  else:
24
  vis = img