Update app.py
Browse files
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'
|
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)
|