rsortino commited on
Commit
3bd3e75
·
verified ·
1 Parent(s): cb4c885

Update device support

Browse files
Files changed (1) hide show
  1. tasks/image.py +2 -2
tasks/image.py CHANGED
@@ -18,7 +18,7 @@ load_dotenv()
18
 
19
  router = APIRouter()
20
 
21
- DESCRIPTION = "YOLO-EFD"
22
  ROUTE = "/image"
23
 
24
  def parse_boxes(annotation_string):
@@ -96,7 +96,7 @@ async def evaluate_image(request: ImageEvaluationRequest):
96
  test_dataset = train_test["test"]
97
 
98
  model = YOLOv10("best.pt")
99
- device = "cuda"
100
  model = model.to(device)
101
 
102
  # Start tracking emissions
 
18
 
19
  router = APIRouter()
20
 
21
+ DESCRIPTION = "YOLO-EFD CEA-List"
22
  ROUTE = "/image"
23
 
24
  def parse_boxes(annotation_string):
 
96
  test_dataset = train_test["test"]
97
 
98
  model = YOLOv10("best.pt")
99
+ device = "cuda" if torch.cuda.is_available() else "cpu"
100
  model = model.to(device)
101
 
102
  # Start tracking emissions