DawnC commited on
Commit
cb218a5
1 Parent(s): deb4920

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -6
app.py CHANGED
@@ -646,7 +646,7 @@ num_classes = len(dog_breeds)
646
  model = BaseModel(num_classes=num_classes, device=device)
647
 
648
  # Load model path
649
- model_path = '/content/drive/Othercomputers/我的 MacBook Pro/Learning/Cats_Dogs_Detector/(124_TEST)_models/[124_82.30]_best_model_dog.pth'
650
  checkpoint = torch.load(model_path, map_location=device)
651
 
652
  # Load model state
@@ -964,11 +964,11 @@ def main():
964
  with gr.Tabs():
965
  # 1. 品種檢測標籤頁
966
  example_images = [
967
- '/content/drive/Othercomputers/我的 MacBook Pro/Learning/Cats_Dogs_Detector/test_images/Border_Collie.jpg',
968
- '/content/drive/Othercomputers/我的 MacBook Pro/Learning/Cats_Dogs_Detector/test_images/Golden_Retriever.jpeg',
969
- '/content/drive/Othercomputers/我的 MacBook Pro/Learning/Cats_Dogs_Detector/test_images/Saint_Bernard.jpeg',
970
- '/content/drive/Othercomputers/我的 MacBook Pro/Learning/Cats_Dogs_Detector/test_images/Samoyed.jpg',
971
- '/content/drive/Othercomputers/我的 MacBook Pro/Learning/Cats_Dogs_Detector/test_images/French_Bulldog.jpeg'
972
  ]
973
  detection_components = create_detection_tab(predict, example_images)
974
 
 
646
  model = BaseModel(num_classes=num_classes, device=device)
647
 
648
  # Load model path
649
+ model_path = '[124_82.30]_best_model_dog.pth'
650
  checkpoint = torch.load(model_path, map_location=device)
651
 
652
  # Load model state
 
964
  with gr.Tabs():
965
  # 1. 品種檢測標籤頁
966
  example_images = [
967
+ 'Border_Collie.jpg',
968
+ 'Golden_Retriever.jpeg',
969
+ 'Saint_Bernard.jpeg',
970
+ 'Samoyed.jpg',
971
+ 'French_Bulldog.jpeg'
972
  ]
973
  detection_components = create_detection_tab(predict, example_images)
974