Kr1n3 commited on
Commit
334b52c
1 Parent(s): 90ca1cc

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -1
app.py CHANGED
@@ -5,7 +5,12 @@ from torch.nn import functional as F
5
  import torchvision
6
  from torchvision import transforms
7
 
8
- model = torch.hub.load('ultralytics/yolov5', 'custom', 'runs/train-cls/exp/weights/best.pt')
 
 
 
 
 
9
  data_transform1=transforms.Compose([
10
  transforms.Resize((224,224)),
11
  transforms.ToTensor(),
 
5
  import torchvision
6
  from torchvision import transforms
7
 
8
+ REPO_ID = "Kr1n3/Fashion-Items-Classification"
9
+ FILENAME = "best.pt"
10
+
11
+ yolov5_weights = hf_hub_download(repo_id=REPO_ID, filename=FILENAME)
12
+
13
+ model = torch.hub.load('ultralytics/yolov5', 'custom', path=yolov5_weights, force_reload=True)
14
  data_transform1=transforms.Compose([
15
  transforms.Resize((224,224)),
16
  transforms.ToTensor(),