Spaces:
Sleeping
Sleeping
# utils/preprocessing.py | |
from PIL import Image | |
import numpy as np | |
def preprocess_image(image): | |
image = image.resize((150, 150)) | |
image = np.array(image) / 255.0 | |
image = np.expand_dims(image, axis=0) | |
return image | |