Update model/model.py
Browse files- model/model.py +2 -2
model/model.py
CHANGED
|
@@ -18,8 +18,8 @@ def predict(image_path):
|
|
| 18 |
])
|
| 19 |
|
| 20 |
# Preprocess the image
|
| 21 |
-
|
| 22 |
-
input_tensor = transform(
|
| 23 |
|
| 24 |
|
| 25 |
outputs = model(input_tensor)
|
|
|
|
| 18 |
])
|
| 19 |
|
| 20 |
# Preprocess the image
|
| 21 |
+
image_tensor = torch.from_numpy(image_path).permute(2, 0, 1).float()
|
| 22 |
+
input_tensor = transform(image_tensor).unsqueeze(0) # Add batch dimension
|
| 23 |
|
| 24 |
|
| 25 |
outputs = model(input_tensor)
|