kadirnar commited on
Commit
2a21ba1
·
verified ·
1 Parent(s): e78a6e2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -0
app.py CHANGED
@@ -49,6 +49,7 @@ def attempt_download_from_hub(repo_id, hf_token=None):
49
  def LeYOLO_inference(image, model_id, image_size, conf_threshold, iou_threshold):
50
  MODEL_PATH = attempt_download_from_hub(model_id)
51
  model = model = YOLO(MODEL_PATH)
 
52
  results = model(source=image, imgsz=image_size, iou=iou_threshold, conf=conf_threshold, verbose=False)[0]
53
  detections = sv.Detections.from_ultralytics(results)
54
 
 
49
  def LeYOLO_inference(image, model_id, image_size, conf_threshold, iou_threshold):
50
  MODEL_PATH = attempt_download_from_hub(model_id)
51
  model = model = YOLO(MODEL_PATH)
52
+ model.to('cuda')
53
  results = model(source=image, imgsz=image_size, iou=iou_threshold, conf=conf_threshold, verbose=False)[0]
54
  detections = sv.Detections.from_ultralytics(results)
55