Spaces:
Runtime error
Runtime error
Commit ·
20869cc
1
Parent(s): 4b6fc2d
Update app.py
Browse files
app.py
CHANGED
|
@@ -21,6 +21,7 @@ backbone = model_type.backbones.resnet50_fpn
|
|
| 21 |
#model = model_type.model(backbone=backbone(pretrained=True), num_classes=len(parser.class_map), **extra_args)
|
| 22 |
|
| 23 |
import models
|
|
|
|
| 24 |
|
| 25 |
|
| 26 |
# Transforms
|
|
@@ -49,6 +50,7 @@ article="<p style='text-align: center'><a href='https://dicksonneoh.com/fridge-d
|
|
| 49 |
enable_queue=True
|
| 50 |
#examples = [['sample_images/3.jpg']]
|
| 51 |
examples = [["sample_images/"+file] for file in files]
|
|
|
|
| 52 |
def show_preds(input_image, display_label, display_bbox, detection_threshold):
|
| 53 |
if detection_threshold==0: detection_threshold=0.5
|
| 54 |
img = PIL.Image.fromarray(input_image, 'RGB')
|
|
|
|
| 21 |
#model = model_type.model(backbone=backbone(pretrained=True), num_classes=len(parser.class_map), **extra_args)
|
| 22 |
|
| 23 |
import models
|
| 24 |
+
from models import model.pth
|
| 25 |
|
| 26 |
|
| 27 |
# Transforms
|
|
|
|
| 50 |
enable_queue=True
|
| 51 |
#examples = [['sample_images/3.jpg']]
|
| 52 |
examples = [["sample_images/"+file] for file in files]
|
| 53 |
+
|
| 54 |
def show_preds(input_image, display_label, display_bbox, detection_threshold):
|
| 55 |
if detection_threshold==0: detection_threshold=0.5
|
| 56 |
img = PIL.Image.fromarray(input_image, 'RGB')
|