Update app.py
Browse files
app.py
CHANGED
@@ -33,7 +33,7 @@ if uploaded_image:
|
|
33 |
|
34 |
# Preprocess the image
|
35 |
img = image.resize((384, 288))
|
36 |
-
img = np.array(img) /
|
37 |
img = np.expand_dims(np.transpose(img, (2, 0, 1)), axis=0)
|
38 |
img = torch.from_numpy(img)
|
39 |
img = img.type(torch.FloatTensor).to(device)
|
|
|
33 |
|
34 |
# Preprocess the image
|
35 |
img = image.resize((384, 288))
|
36 |
+
img = np.array(img) / 255.
|
37 |
img = np.expand_dims(np.transpose(img, (2, 0, 1)), axis=0)
|
38 |
img = torch.from_numpy(img)
|
39 |
img = img.type(torch.FloatTensor).to(device)
|