Update app.py
Browse files
app.py
CHANGED
|
@@ -16,7 +16,7 @@ transformer = transforms.Compose([
|
|
| 16 |
])
|
| 17 |
|
| 18 |
|
| 19 |
-
model_name = '
|
| 20 |
### 2. Model and transforms preparation ###
|
| 21 |
|
| 22 |
if model_name == 'custom':
|
|
@@ -36,7 +36,7 @@ elif model_name == 'resnet':
|
|
| 36 |
# Load saved weights
|
| 37 |
model.load_state_dict(
|
| 38 |
torch.load(
|
| 39 |
-
f="./cnn-
|
| 40 |
map_location=torch.device("cpu"), # load to CPU
|
| 41 |
)
|
| 42 |
)
|
|
|
|
| 16 |
])
|
| 17 |
|
| 18 |
|
| 19 |
+
model_name = 'resnet'
|
| 20 |
### 2. Model and transforms preparation ###
|
| 21 |
|
| 22 |
if model_name == 'custom':
|
|
|
|
| 36 |
# Load saved weights
|
| 37 |
model.load_state_dict(
|
| 38 |
torch.load(
|
| 39 |
+
f="./cnn-resnet-version-1.pt",
|
| 40 |
map_location=torch.device("cpu"), # load to CPU
|
| 41 |
)
|
| 42 |
)
|