Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -131,7 +131,7 @@ device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
|
|
131 |
model = BaseModel(num_classes=num_classes, device=device).to(device)
|
132 |
|
133 |
# Load model path
|
134 |
-
model_path = '
|
135 |
checkpoint = torch.load(model_path, map_location=device)
|
136 |
|
137 |
# Load model state
|
@@ -441,11 +441,11 @@ def main():
|
|
441 |
with gr.Tabs():
|
442 |
# 1. 品種檢測標籤頁
|
443 |
example_images = [
|
444 |
-
'
|
445 |
-
'
|
446 |
-
'
|
447 |
-
'
|
448 |
-
'
|
449 |
]
|
450 |
detection_components = create_detection_tab(predict, example_images)
|
451 |
|
|
|
131 |
model = BaseModel(num_classes=num_classes, device=device).to(device)
|
132 |
|
133 |
# Load model path
|
134 |
+
model_path = '124_82.30_best_model_dog.pth'
|
135 |
checkpoint = torch.load(model_path, map_location=device)
|
136 |
|
137 |
# Load model state
|
|
|
441 |
with gr.Tabs():
|
442 |
# 1. 品種檢測標籤頁
|
443 |
example_images = [
|
444 |
+
'Border_Collie.jpg',
|
445 |
+
'Golden_Retriever.jpeg',
|
446 |
+
'Saint_Bernard.jpeg',
|
447 |
+
'Samoyed.jpg',
|
448 |
+
'French_Bulldog.jpeg'
|
449 |
]
|
450 |
detection_components = create_detection_tab(predict, example_images)
|
451 |
|