Can some body help me, I can't load my custom model

I’m using torch 1.11.0+cu113

import torch
path = ‘’
model = torch.hub.load(‘.’, ‘custom’, path=path, source=‘local’)

I got
File “.\”, line 3, in
model = torch.hub.load(‘.’, ‘custom’, path=path, source=‘local’)
File “C:\Users\bukob\AppData\Local\Programs\Python\Python38\lib\site-packages\torch\”, line 404, in load
model = _load_local(repo_or_dir, model, *args, **kwargs)
File “C:\Users\bukob\AppData\Local\Programs\Python\Python38\lib\site-packages\torch\”, line 430, in _load_local
hub_module = _import_module(MODULE_HUBCONF, hubconf_path)
File “C:\Users\bukob\AppData\Local\Programs\Python\Python38\lib\site-packages\torch\”, line 76, in _import_module
File “”, line 779, in exec_module
File “”, line 915, in get_code
File “”, line 972, in get_data
FileNotFoundError: [Errno 2] No such file or directory: ‘.\’ seems to be defined in the Yolo repository of I’m not mistaken, so you might need to install the repo or make sure the scripts are oin your python path.

yeah you’re right I have no then I use this

import torch
import cv2

path = ‘’
model = torch.hub.load(‘ultralytics/yolov5’, ‘custom’, path)

img = cv2.imread(“images/1.jpg”)
result = model(img)


and it works, THX for your helpful answer

Hi ptrblck, Could you help me please?