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