mennamostafa55555 commited on
Commit
2a0ffec
·
1 Parent(s): 410e142

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -29,7 +29,7 @@ annotatormask=sv.MaskAnnotator()
29
  def yolov8_inference(
30
  image: gr.inputs.Image = None,
31
  model_name: gr.inputs.Dropdown = None,
32
- image_size: gr.inputs.Slider = 320,
33
  conf_threshold: gr.inputs.Slider = 0.25,
34
  iou_threshold: gr.inputs.Slider = 0.45,
35
  ):
@@ -37,7 +37,7 @@ def yolov8_inference(
37
 
38
  model = YOLO("https://huggingface.co/spaces/devisionx/Fifth_model/blob/main/best_weigh.pt")
39
 
40
- results = model(image,conf=conf_threshold,iou=iou_threshold ,imgsz=320)[0]
41
  detections = sv.Detections.from_yolov8(results)
42
  annotated_image = annotatorbbox.annotate(scene=image, detections=detections)
43
  annotated_image = annotatormask.annotate(scene=annotated_image, detections=detections)
 
29
  def yolov8_inference(
30
  image: gr.inputs.Image = None,
31
  model_name: gr.inputs.Dropdown = None,
32
+ image_size: gr.inputs.Slider = 360,
33
  conf_threshold: gr.inputs.Slider = 0.25,
34
  iou_threshold: gr.inputs.Slider = 0.45,
35
  ):
 
37
 
38
  model = YOLO("https://huggingface.co/spaces/devisionx/Fifth_model/blob/main/best_weigh.pt")
39
 
40
+ results = model(image,conf=conf_threshold,iou=iou_threshold ,imgsz=360)[0]
41
  detections = sv.Detections.from_yolov8(results)
42
  annotated_image = annotatorbbox.annotate(scene=image, detections=detections)
43
  annotated_image = annotatormask.annotate(scene=annotated_image, detections=detections)