Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -33,7 +33,12 @@ class FoodIngredientClassifier(nn.Module):
|
|
| 33 |
# -----------------------------
|
| 34 |
# Load checkpoint
|
| 35 |
# -----------------------------
|
| 36 |
-
checkpoint = torch.load(
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 37 |
|
| 38 |
mlb = checkpoint["mlb"]
|
| 39 |
class_names = mlb.classes_
|
|
|
|
| 33 |
# -----------------------------
|
| 34 |
# Load checkpoint
|
| 35 |
# -----------------------------
|
| 36 |
+
checkpoint = torch.load(
|
| 37 |
+
"best_model.pth",
|
| 38 |
+
map_location=device,
|
| 39 |
+
weights_only=False
|
| 40 |
+
)
|
| 41 |
+
|
| 42 |
|
| 43 |
mlb = checkpoint["mlb"]
|
| 44 |
class_names = mlb.classes_
|