def preprocess_image(img_path):
    img = image.load_img(img_path, target_size=(28, 28), grayscale=True)
    input_img_data = image.img_to_array(img)
    input_img_data = input_img_data.reshape(1, 28, 28, 1)
    input_img_data = input_img_data.astype('float32')
    input_img_data /= 255
    return input_img_data
def preprocess_image(img_path):
    img = image.load_img(img_path, target_size=(28, 28), grayscale=True)
    input_img_data = image.img_to_array(img)
    input_img_data = input_img_data.reshape(1, 28, 28, 1)
    input_img_data = input_img_data.astype('float32')
    input_img_data /= 255
    return input_img_data