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

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -1
app.py CHANGED
@@ -49,7 +49,12 @@ 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
- model = YOLO('/mnt/data/best.pt').to(device) # Updated model path
 
 
 
 
 
53
  if device == "cuda":
54
  model.half() # Use half-precision (FP16)
55
  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
+
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}")