Update app.py
Browse files
app.py
CHANGED
@@ -26,9 +26,9 @@ def predict(img):
|
|
26 |
image = transforms.Resize((480,640))(img)
|
27 |
tensor = transform_image(image=image)
|
28 |
|
29 |
-
|
30 |
with torch.no_grad():
|
31 |
-
outputs =
|
32 |
|
33 |
outputs = torch.argmax(outputs,1)
|
34 |
mask = np.array(outputs.cpu())
|
|
|
26 |
image = transforms.Resize((480,640))(img)
|
27 |
tensor = transform_image(image=image)
|
28 |
|
29 |
+
model.to(device)
|
30 |
with torch.no_grad():
|
31 |
+
outputs = model(tensor)
|
32 |
|
33 |
outputs = torch.argmax(outputs,1)
|
34 |
mask = np.array(outputs.cpu())
|