sayedM commited on
Commit
9c6e363
·
1 Parent(s): 8afaf27

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -33,7 +33,7 @@ def yolov8_inference(
33
 
34
  image=image[:, :, ::-1].astype(np.uint8)
35
  model = YOLO("https://huggingface.co/spaces/devisionx/Final_demo/blob/main/best_weights.pt")
36
- results = model(image,imgsz=360)[0]
37
  image=image[:, :, ::-1].astype(np.uint8)
38
  detections = sv.Detections.from_yolov8(results)
39
  annotated_image = annotatormask.annotate(scene=image, detections=detections)
@@ -58,7 +58,7 @@ title = "Materials-Demo"
58
  '''
59
  import os
60
  examples = [
61
- ["m1.jpg", 0.6, 0.45],
62
  ["m2.jpg", 0.25, 0.45],
63
  ["m3.jpg", 0.25, 0.45],
64
  ]
 
33
 
34
  image=image[:, :, ::-1].astype(np.uint8)
35
  model = YOLO("https://huggingface.co/spaces/devisionx/Final_demo/blob/main/best_weights.pt")
36
+ results = model(image,imgsz=360,conf=conf_threshold,iou=iou_threshold)[0]
37
  image=image[:, :, ::-1].astype(np.uint8)
38
  detections = sv.Detections.from_yolov8(results)
39
  annotated_image = annotatormask.annotate(scene=image, detections=detections)
 
58
  '''
59
  import os
60
  examples = [
61
+ ["m1.jpg", 0.25, 0.45],
62
  ["m2.jpg", 0.25, 0.45],
63
  ["m3.jpg", 0.25, 0.45],
64
  ]