sayedM commited on
Commit
ee67eda
·
1 Parent(s): 0787ba1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -35,7 +35,7 @@ def yolov8_inference(
35
 
36
  image=image[:, :, ::-1].astype(np.uint8)
37
  model = YOLO("https://huggingface.co/spaces/devisionx/Sixth_Demo/blob/main/bestt_weight.pt")
38
- results = model(image,imgsz=640)[0]
39
  image=image[:, :, ::-1].astype(np.uint8)
40
  detections = sv.Detections.from_yolov8(results)
41
  annotated_image = annotatormask.annotate(scene=image, detections=detections)
@@ -61,7 +61,7 @@ title = "Tennis Court Demo"
61
  '''
62
  import os
63
  examples = [
64
- ["t1.jpg", 0.6, 0.45],
65
  ["t2.jpg", 0.25, 0.45],
66
  ["t3.jpg", 0.25, 0.45],
67
  ]
 
35
 
36
  image=image[:, :, ::-1].astype(np.uint8)
37
  model = YOLO("https://huggingface.co/spaces/devisionx/Sixth_Demo/blob/main/bestt_weight.pt")
38
+ results = model(image,imgsz=640,conf=conf_threshold,iou=iou_threshold)[0]
39
  image=image[:, :, ::-1].astype(np.uint8)
40
  detections = sv.Detections.from_yolov8(results)
41
  annotated_image = annotatormask.annotate(scene=image, detections=detections)
 
61
  '''
62
  import os
63
  examples = [
64
+ ["t1.jpg", 0.25, 0.45],
65
  ["t2.jpg", 0.25, 0.45],
66
  ["t3.jpg", 0.25, 0.45],
67
  ]