mennamostafa55555 commited on
Commit
73fedc4
·
1 Parent(s): bbeecd9

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -23,7 +23,7 @@ annotatormask=sv.MaskAnnotator()
23
  def yolov8_inference(
24
  image: gr.inputs.Image = None,
25
  model_name: gr.inputs.Dropdown = None,
26
- image_size: gr.inputs.Slider = 640,
27
  conf_threshold: gr.inputs.Slider = 0.25,
28
  iou_threshold: gr.inputs.Slider = 0.45,
29
  ):
@@ -31,7 +31,7 @@ def yolov8_inference(
31
 
32
  model = YOLO("https://huggingface.co/spaces/devisionx/Amazon_demo/blob/main/amazon.pt")
33
 
34
- results = model(image,conf=conf_threshold,iou=iou_threshold ,imgsz=640)[0]
35
  detections = sv.Detections.from_yolov8(results)
36
  annotated_image = annotatorbbox.annotate(scene=image, detections=detections)
37
  # annotated_image = annotatormask.annotate(scene=annotated_image, detections=detections)
 
23
  def yolov8_inference(
24
  image: gr.inputs.Image = None,
25
  model_name: gr.inputs.Dropdown = None,
26
+ image_size: gr.inputs.Slider = 1280,
27
  conf_threshold: gr.inputs.Slider = 0.25,
28
  iou_threshold: gr.inputs.Slider = 0.45,
29
  ):
 
31
 
32
  model = YOLO("https://huggingface.co/spaces/devisionx/Amazon_demo/blob/main/amazon.pt")
33
 
34
+ results = model(image,conf=conf_threshold,iou=iou_threshold ,imgsz=1280)[0]
35
  detections = sv.Detections.from_yolov8(results)
36
  annotated_image = annotatorbbox.annotate(scene=image, detections=detections)
37
  # annotated_image = annotatormask.annotate(scene=annotated_image, detections=detections)