sensei-ml commited on
Commit
8d7af13
·
verified ·
1 Parent(s): 7ddb3a5

Update model/model.py

Browse files
Files changed (1) hide show
  1. model/model.py +2 -2
model/model.py CHANGED
@@ -18,8 +18,8 @@ def predict(image_path):
18
  ])
19
 
20
  # Preprocess the image
21
- #image = Image.fromarray(image_path)
22
- input_tensor = transform(image_path).unsqueeze(0) # Add batch dimension
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)