Spaces:
Runtime error
Runtime error
bruhhhhh
Browse files
app.py
CHANGED
@@ -22,10 +22,10 @@ def predict(img: np.ndarray) -> str:
|
|
22 |
# The MobileNet model expects images in RGB format.
|
23 |
# Resize to MobileNet image shape.
|
24 |
input_image = cv2.resize(src=img, dsize=(224, 224))
|
25 |
-
print(f'resized: {
|
26 |
# Reshape to model input shape.
|
27 |
input_image = np.expand_dims(input_image, 0)
|
28 |
-
print(f'final shape: {
|
29 |
|
30 |
# Get inference result
|
31 |
result_infer = compiled_model([input_image])[output_layer]
|
|
|
22 |
# The MobileNet model expects images in RGB format.
|
23 |
# Resize to MobileNet image shape.
|
24 |
input_image = cv2.resize(src=img, dsize=(224, 224))
|
25 |
+
print(f'resized: {input_image.shape}')
|
26 |
# Reshape to model input shape.
|
27 |
input_image = np.expand_dims(input_image, 0)
|
28 |
+
print(f'final shape: {input_image.shape}')
|
29 |
|
30 |
# Get inference result
|
31 |
result_infer = compiled_model([input_image])[output_layer]
|