Spaces:
Runtime error
Runtime error
use input image!
Browse files
app.py
CHANGED
|
@@ -20,7 +20,7 @@ def predict(img: np.ndarray) -> str:
|
|
| 20 |
# input: numpy array of image in RGB (see defaults for https://www.gradio.app/docs/#image)
|
| 21 |
|
| 22 |
# Text detection models expect an image in BGR format.
|
| 23 |
-
image = cv2.cvtColor(
|
| 24 |
# N,C,H,W = batch size, number of channels, height, width.
|
| 25 |
N, C, H, W = input_layer_ir.shape
|
| 26 |
# Resize the image to meet network expected input sizes.
|
|
|
|
| 20 |
# input: numpy array of image in RGB (see defaults for https://www.gradio.app/docs/#image)
|
| 21 |
|
| 22 |
# Text detection models expect an image in BGR format.
|
| 23 |
+
image = cv2.cvtColor(img, cv2.COLOR_RGB2BGR)
|
| 24 |
# N,C,H,W = batch size, number of channels, height, width.
|
| 25 |
N, C, H, W = input_layer_ir.shape
|
| 26 |
# Resize the image to meet network expected input sizes.
|