atalaydenknalbant commited on
Commit
64a71dd
·
verified ·
1 Parent(s): 8cd3886

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -36,7 +36,7 @@ def yolo_inference(image, model_id, conf_threshold, iou_threshold, max_detection
36
  # Download models
37
  model_path = download_models(repo_id, model_id)
38
 
39
- model = YOLO(model_path, device = "cuda:0" if torch.cuda.is_available() else "cpu")
40
  results = model(source=image, imgsz=640, iou=iou_threshold, conf=conf_threshold, verbose=False, max_det=max_detection)[0]
41
  detections = sv.Detections.from_ultralytics(results)
42
 
 
36
  # Download models
37
  model_path = download_models(repo_id, model_id)
38
 
39
+ model = YOLO(model_path)
40
  results = model(source=image, imgsz=640, iou=iou_threshold, conf=conf_threshold, verbose=False, max_det=max_detection)[0]
41
  detections = sv.Detections.from_ultralytics(results)
42