atalaydenknalbant commited on
Commit
c7580e7
·
1 Parent(s): a97fda4

Removed extra spaces.GPU() decorator.

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -55,12 +55,12 @@ def load_yolo_model(model_name, confidence_threshold=0.5):
55
  global model
56
  model_path = model_name
57
  model = AutoDetectionModel.from_pretrained(
58
- model_type="ultralytics", model_path=model_path, device='cuda:0',
59
  confidence_threshold=confidence_threshold, image_size=IMAGE_SIZE
60
  )
61
  return model
62
 
63
- @spaces.GPU()
64
  def sahi_yolo_inference(
65
  image,
66
  yolo_model_name,
 
55
  global model
56
  model_path = model_name
57
  model = AutoDetectionModel.from_pretrained(
58
+ model_type="ultralytics", model_path=model_path, device=None, # auto device selection
59
  confidence_threshold=confidence_threshold, image_size=IMAGE_SIZE
60
  )
61
  return model
62
 
63
+ @spaces.GPU(duration=60)
64
  def sahi_yolo_inference(
65
  image,
66
  yolo_model_name,