aayanb09 commited on
Commit
a4361b6
·
verified ·
1 Parent(s): 517aa6d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -1
app.py CHANGED
@@ -17,7 +17,11 @@ NUM_CLASSES = len(classes)
17
 
18
  # Load model
19
  model = FoodIngredientClassifier(NUM_CLASSES)
20
- checkpoint = torch.load("best_model.pth", map_location=DEVICE)
 
 
 
 
21
  model.load_state_dict(checkpoint["model_state_dict"])
22
  model.to(DEVICE)
23
  model.eval()
 
17
 
18
  # Load model
19
  model = FoodIngredientClassifier(NUM_CLASSES)
20
+ checkpoint = torch.load(
21
+ "best_model.pth",
22
+ map_location=DEVICE,
23
+ weights_only=False
24
+ )
25
  model.load_state_dict(checkpoint["model_state_dict"])
26
  model.to(DEVICE)
27
  model.eval()