Update app.py
Browse files
app.py
CHANGED
|
@@ -21,7 +21,7 @@ model_2 = models.torchvision.retinanet.model(
|
|
| 21 |
# from huggingface_hub import hf_hub_download
|
| 22 |
# hf_hub_download(repo_id="Alesteba/deep_model_02", filename="retinanet_racoon.pth")
|
| 23 |
|
| 24 |
-
state_dict = torch.load('./retinanet_racoon.pth')
|
| 25 |
|
| 26 |
model_2.load_state_dict(state_dict)
|
| 27 |
|
|
|
|
| 21 |
# from huggingface_hub import hf_hub_download
|
| 22 |
# hf_hub_download(repo_id="Alesteba/deep_model_02", filename="retinanet_racoon.pth")
|
| 23 |
|
| 24 |
+
state_dict = torch.load('./retinanet_racoon.pth', map_location=torch.device('cpu'))
|
| 25 |
|
| 26 |
model_2.load_state_dict(state_dict)
|
| 27 |
|