MbModel / utils /model_loader.py
MobvxtR's picture
Update utils/model_loader.py
11a04cf verified
raw
history blame
301 Bytes
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",
filename="best.pt",
revision="main"
)
return YOLO(model_path)