Update app.py
Browse files
app.py
CHANGED
|
@@ -22,7 +22,7 @@ class VisionTransformer(nn.Module):
|
|
| 22 |
return self.model(x)
|
| 23 |
|
| 24 |
# ==== Load the trained weights ====
|
| 25 |
-
model_path = "./models/
|
| 26 |
device = torch.device("cpu") # MPS not available on HF Spaces
|
| 27 |
|
| 28 |
model = VisionTransformer(num_classes=2, model_name="vit_small_patch16_224")
|
|
|
|
| 22 |
return self.model(x)
|
| 23 |
|
| 24 |
# ==== Load the trained weights ====
|
| 25 |
+
model_path = "./models/vit_small_patch16_224_best.pth"
|
| 26 |
device = torch.device("cpu") # MPS not available on HF Spaces
|
| 27 |
|
| 28 |
model = VisionTransformer(num_classes=2, model_name="vit_small_patch16_224")
|