from ultralytics import YOLO | |
from huggingface_hub import hf_hub_download | |
def load_model(): | |
# Download model from Hugging Face Hub (if hosted) | |
model_path = hf_hub_download( | |
repo_id="MobvxtR/mbModel/models" | |
filename="best.pt", | |
revision="main" | |
) | |
return YOLO(model_path) |