DawnC commited on
Commit
ca056ed
1 Parent(s): b14ab04

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -6
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 = '/content/drive/Othercomputers/我的 MacBook Pro/Learning/Cats_Dogs_Detector/(124_TEST)_models/[124_82.30]_best_model_dog.pth'
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
- '/content/drive/Othercomputers/我的 MacBook Pro/Learning/Cats_Dogs_Detector/test_images/Border_Collie.jpg',
445
- '/content/drive/Othercomputers/我的 MacBook Pro/Learning/Cats_Dogs_Detector/test_images/Golden_Retriever.jpeg',
446
- '/content/drive/Othercomputers/我的 MacBook Pro/Learning/Cats_Dogs_Detector/test_images/Saint_Bernard.jpeg',
447
- '/content/drive/Othercomputers/我的 MacBook Pro/Learning/Cats_Dogs_Detector/test_images/Samoyed.jpg',
448
- '/content/drive/Othercomputers/我的 MacBook Pro/Learning/Cats_Dogs_Detector/test_images/French_Bulldog.jpeg'
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