Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -18,7 +18,8 @@ model, transforms = vit_b_16(num_classes=101,
|
|
| 18 |
freeze_gradients=True,
|
| 19 |
unfreeze_blocks=0)
|
| 20 |
|
| 21 |
-
model.load_state_dict(torch.load('vit_b_16_unfreeze_one_encoder_block_10_total_epochs.pth'
|
|
|
|
| 22 |
|
| 23 |
|
| 24 |
def predict_single_image(img):
|
|
|
|
| 18 |
freeze_gradients=True,
|
| 19 |
unfreeze_blocks=0)
|
| 20 |
|
| 21 |
+
model.load_state_dict(torch.load('vit_b_16_unfreeze_one_encoder_block_10_total_epochs.pth',
|
| 22 |
+
map_location=torch.device("cpu")))
|
| 23 |
|
| 24 |
|
| 25 |
def predict_single_image(img):
|