DSatishchandra's picture
Update models/windmill_model.py
bc5d485 verified
raw
history blame contribute delete
359 Bytes
from ultralytics import YOLO # Import YOLO from Ultralytics
# Function to load the YOLOv5 model for windmills
def load_windmill_model():
try:
model = YOLO("yolov5s.pt") # Load pre-trained YOLOv5s model
return model
except Exception as e:
raise Exception(f"Error loading windmill model: {str(e)}") # Raise error with details