aayanb09 commited on
Commit
0401c3e
·
verified ·
1 Parent(s): 801be37

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -41,7 +41,7 @@ DEVICE = torch.device("cuda" if torch.cuda.is_available() else "cpu")
41
  THRESHOLD = 0.5
42
 
43
  def load_model():
44
- checkpoint = torch.load("model.pth", map_location=DEVICE)
45
  mlb = checkpoint["mlb"]
46
  num_classes = len(mlb.classes_)
47
  model = FoodIngredientClassifier(num_classes)
 
41
  THRESHOLD = 0.5
42
 
43
  def load_model():
44
+ checkpoint = torch.load("model.pth", map_location=DEVICE, weights_only=False)
45
  mlb = checkpoint["mlb"]
46
  num_classes = len(mlb.classes_)
47
  model = FoodIngredientClassifier(num_classes)