TheoLvs commited on
Commit
ffe49ce
·
verified ·
1 Parent(s): debe63a

Update tasks/image.py

Browse files
Files changed (1) hide show
  1. tasks/image.py +1 -1
tasks/image.py CHANGED
@@ -102,7 +102,7 @@ async def evaluate_image(request: ImageEvaluationRequest):
102
 
103
  model_path = Path("tasks", "models")
104
  model_name = "best.pt"
105
- model = YOLO(Path(model_path, model_name), task="detect")
106
  device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
107
  model = model.to(device)
108
  predictions = []
 
102
 
103
  model_path = Path("tasks", "models")
104
  model_name = "best.pt"
105
+ model = YOLO(Path(model_path, model_name), task="detect",weights_only = True)
106
  device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
107
  model = model.to(device)
108
  predictions = []