mirari commited on
Commit
dd39d76
1 Parent(s): 844b14d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -3
app.py CHANGED
@@ -3,10 +3,9 @@ import gradio as gr
3
 
4
  class_map = ClassMap(['kangaroo'])
5
  model = models.torchvision.faster_rcnn.model(backbone=models.torchvision.faster_rcnn.backbones.resnet18_fpn, num_classes=len(class_map))
6
- state_dict = torch.load('fasterRCNNKangaroo.pth', map_location=torch.device('cpu'))
7
  model.load_state_dict(state_dict)
8
-
9
- labels = learn.dls.vocab
10
 
11
  def predict(img):
12
  img = PILImage.create(img)
 
3
 
4
  class_map = ClassMap(['kangaroo'])
5
  model = models.torchvision.faster_rcnn.model(backbone=models.torchvision.faster_rcnn.backbones.resnet18_fpn, num_classes=len(class_map))
6
+ state_dict = torch.load('fasterRCNNKangaroo.pth')
7
  model.load_state_dict(state_dict)
8
+ size = 384
 
9
 
10
  def predict(img):
11
  img = PILImage.create(img)