DSatishchandra commited on
Commit
65afddc
·
verified ·
1 Parent(s): 23171b2

Update models/windmill_model.py

Browse files
Files changed (1) hide show
  1. models/windmill_model.py +2 -3
models/windmill_model.py CHANGED
@@ -1,9 +1,8 @@
1
- import torch
2
 
3
  def load_windmill_model():
4
  try:
5
- model = torch.hub.load('ultralytics/yolov5', 'yolov5s', pretrained=True, force_reload=True)
6
- model.eval()
7
  return model
8
  except Exception as e:
9
  raise Exception(f"Error loading windmill model: {str(e)}")
 
1
+ from ultralytics import YOLO
2
 
3
  def load_windmill_model():
4
  try:
5
+ model = YOLO("yolov5s.pt") # Load the YOLOv5s model
 
6
  return model
7
  except Exception as e:
8
  raise Exception(f"Error loading windmill model: {str(e)}")