aje6 commited on
Commit
c76d781
·
verified ·
1 Parent(s): ac87b40

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -248,7 +248,7 @@ def predict(image):
248
  image = cv2.resize(image, (640, 640))
249
 
250
  # Convert the image to a numpy array and add a batch dimension
251
- image = np.expand_dims(image, axis=0)
252
 
253
  # Perform inference
254
  output = model.run(None, {input_name: image})
 
248
  image = cv2.resize(image, (640, 640))
249
 
250
  # Convert the image to a numpy array and add a batch dimension
251
+ image = np.expand_dims(image, axis=0).astype(np.float32)
252
 
253
  # Perform inference
254
  output = model.run(None, {input_name: image})