Spaces:
Runtime error
Runtime error
| #src/preprocess.py | |
| import cv2 | |
| import numpy as np | |
| IMG_SIZE = 224 | |
| def preprocess_image(image): | |
| image = cv2.resize(image, (IMG_SIZE, IMG_SIZE)) | |
| image = image / 255.0 | |
| return image.astype("float32") | |