Reshmarb commited on
Commit
20eb8e9
·
1 Parent(s): 5e04570

file added

Browse files
Files changed (1) hide show
  1. pred.py +6 -3
pred.py CHANGED
@@ -21,9 +21,12 @@ transform = transforms.Compose([
21
  ])
22
  im = transform(image).unsqueeze(0) # Add batch dimension (BCHW)
23
 
24
-
25
- output = model(im)
26
-
 
 
 
27
 
28
  # Get predictions
29
  with torch.no_grad():
 
21
  ])
22
  im = transform(image).unsqueeze(0) # Add batch dimension (BCHW)
23
 
24
+ try:
25
+ output = model(im)
26
+ print(output)
27
+ except Exception as e:
28
+ logger.error(f"Error in image prediction: {e}")
29
+
30
 
31
  # Get predictions
32
  with torch.no_grad():