aje6 commited on
Commit
575d751
·
verified ·
1 Parent(s): 3847261

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -17,7 +17,9 @@ transform = T.Compose([
17
  ])
18
 
19
  def predict(image):
20
- # Preprocess the image
 
 
21
  img_tensor = transform(image).unsqueeze(0) # Add batch dimension
22
 
23
  # # Make prediction
 
17
  ])
18
 
19
  def predict(image):
20
+ # Preprocess the image by converting the colour space to RGB
21
+ image = cv2.cvtColor(image, cv2.COLOR_BGR2RGB)
22
+
23
  img_tensor = transform(image).unsqueeze(0) # Add batch dimension
24
 
25
  # # Make prediction