mirari commited on
Commit
b44b575
·
1 Parent(s): ddd8378

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -0
app.py CHANGED
@@ -1,7 +1,12 @@
 
1
  from icevision.all import *
 
 
 
2
  import gradio as gr
3
  import PIL
4
 
 
5
  class_map = ClassMap(['kangaroo'])
6
  model = models.torchvision.faster_rcnn.model(backbone=models.torchvision.faster_rcnn.backbones.resnet18_fpn(pretrained=True), num_classes=len(class_map))
7
  state_dict = torch.load('fasterRCNNKangaroo.pth', map_location=torch.device('cpu'))
 
1
+ from fastai.vision.all import *
2
  from icevision.all import *
3
+ from fastai.basics import *
4
+ from fastai.callback import *
5
+ from icevision import models
6
  import gradio as gr
7
  import PIL
8
 
9
+
10
  class_map = ClassMap(['kangaroo'])
11
  model = models.torchvision.faster_rcnn.model(backbone=models.torchvision.faster_rcnn.backbones.resnet18_fpn(pretrained=True), num_classes=len(class_map))
12
  state_dict = torch.load('fasterRCNNKangaroo.pth', map_location=torch.device('cpu'))