aashu-0 commited on
Commit
5a8ece4
·
verified ·
1 Parent(s): 13dab22

update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -4,7 +4,7 @@ import torch
4
 
5
  from model import create_effnetb2_model
6
  from timeit import default_timer as timer
7
- from typing import Tuple, TypedDict
8
 
9
  # class_names
10
  class_names = ['pizza', 'steak', 'sushi']
@@ -19,7 +19,8 @@ effnetb2, effnetb2_transforms = create_effnetb2_model(
19
  # load saved weights
20
  effnetb2.load_state_dict(torch.load(
21
  f = '09_pretrained_effnet_feature_extractor_20_percent.pth',
22
- map_location=torch.device('cpu')
 
23
  )
24
  )
25
 
 
4
 
5
  from model import create_effnetb2_model
6
  from timeit import default_timer as timer
7
+ from typing import Tuple, Dict
8
 
9
  # class_names
10
  class_names = ['pizza', 'steak', 'sushi']
 
19
  # load saved weights
20
  effnetb2.load_state_dict(torch.load(
21
  f = '09_pretrained_effnet_feature_extractor_20_percent.pth',
22
+ map_location=torch.device('cpu'),
23
+ weights_only=True
24
  )
25
  )
26