def load_image(path): img_path = path img = load_img(img_path, target_size=(299, 299)) x = img_to_array(img) x = np.expand_dims(x, axis=0) x = preprocess_input(x) return x