Spaces:
Sleeping
Sleeping
Update app.py
Browse files
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})
|