Update app.py
Browse files
app.py
CHANGED
@@ -20,7 +20,7 @@ genai.configure(api_key=GEMINI_API_KEY)
|
|
20 |
# Load the model
|
21 |
DEVICE = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|
22 |
model = VisionTransformer(img_size=128, patch_size=8, num_classes=len(CLASS_NAMES), embed_dim=768, depth=8, num_heads=12, mlp_dim=2048, dropout=0.1)
|
23 |
-
model.load_state_dict(torch.load("custom_vit.pth", map_location=DEVICE))
|
24 |
model.to(DEVICE)
|
25 |
model.eval()
|
26 |
|
|
|
20 |
# Load the model
|
21 |
DEVICE = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|
22 |
model = VisionTransformer(img_size=128, patch_size=8, num_classes=len(CLASS_NAMES), embed_dim=768, depth=8, num_heads=12, mlp_dim=2048, dropout=0.1)
|
23 |
+
model.load_state_dict(torch.load("models/custom_vit.pth", map_location=DEVICE))
|
24 |
model.to(DEVICE)
|
25 |
model.eval()
|
26 |
|