Yaswanth56 commited on
Commit
fc19309
·
1 Parent(s): 3f9d0e4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -6
app.py CHANGED
@@ -49,12 +49,7 @@ print(f"CUDA available: {torch.cuda.is_available()}")
49
  # Load custom YOLO model
50
  device = "cuda" if torch.cuda.is_available() else "cpu"
51
  print(f"Using device: {device}")
52
-
53
- # Model paths
54
- model_path = '/mnt/data/best.pt' # Path to the custom-trained model
55
-
56
- # Load the model
57
- model = YOLO(model_path).to(device) # Updated model path
58
  if device == "cuda":
59
  model.half() # Use half-precision (FP16)
60
  print(f"Model classes: {model.names}")
 
49
  # Load custom YOLO model
50
  device = "cuda" if torch.cuda.is_available() else "cpu"
51
  print(f"Using device: {device}")
52
+ model = YOLO('./data/best.pt').to(device)
 
 
 
 
 
53
  if device == "cuda":
54
  model.half() # Use half-precision (FP16)
55
  print(f"Model classes: {model.names}")