Spaces:
Runtime error
Runtime error
rohithk-03 commited on
Commit ·
08323cf
1
Parent(s): df285c2
update gdrive url
Browse files
model.py
CHANGED
|
@@ -147,7 +147,7 @@ def check_file(image_path):
|
|
| 147 |
|
| 148 |
model = HybridCNNViT(3, 2)
|
| 149 |
checkpoint = torch.load(
|
| 150 |
-
"/home/user/app/checkpoint32.pth", weights_only=False)
|
| 151 |
checkpoint = remove_module_from_checkpoint(checkpoint)
|
| 152 |
model.load_state_dict(checkpoint['model_state_dict'])
|
| 153 |
# optimizer.load_state_dict(checkpoint['optimizer_state_dict'])
|
|
|
|
| 147 |
|
| 148 |
model = HybridCNNViT(3, 2)
|
| 149 |
checkpoint = torch.load(
|
| 150 |
+
"/home/user/app/checkpoint32.pth", weights_only=False, map_location=torch.device('cpu'))
|
| 151 |
checkpoint = remove_module_from_checkpoint(checkpoint)
|
| 152 |
model.load_state_dict(checkpoint['model_state_dict'])
|
| 153 |
# optimizer.load_state_dict(checkpoint['optimizer_state_dict'])
|