Updates app to add map location
Browse files
app.py
CHANGED
@@ -4,7 +4,7 @@ from src.model import DRModel
|
|
4 |
from torchvision import transforms as T
|
5 |
|
6 |
CHECKPOINT_PATH = "artifacts/dr-model.ckpt"
|
7 |
-
model = DRModel.load_from_checkpoint(CHECKPOINT_PATH)
|
8 |
model.eval()
|
9 |
|
10 |
labels = {
|
@@ -17,7 +17,7 @@ labels = {
|
|
17 |
|
18 |
transform = T.Compose(
|
19 |
[
|
20 |
-
T.Resize((
|
21 |
T.ToTensor(),
|
22 |
T.Normalize([0.485, 0.456, 0.406], [0.229, 0.224, 0.225]),
|
23 |
]
|
|
|
4 |
from torchvision import transforms as T
|
5 |
|
6 |
CHECKPOINT_PATH = "artifacts/dr-model.ckpt"
|
7 |
+
model = DRModel.load_from_checkpoint(CHECKPOINT_PATH, map_location="cpu")
|
8 |
model.eval()
|
9 |
|
10 |
labels = {
|
|
|
17 |
|
18 |
transform = T.Compose(
|
19 |
[
|
20 |
+
T.Resize((224, 224)),
|
21 |
T.ToTensor(),
|
22 |
T.Normalize([0.485, 0.456, 0.406], [0.229, 0.224, 0.225]),
|
23 |
]
|