Spaces:
Runtime error
Runtime error
Update app.py
Browse files19 unmodified lines2021222324252619 unmodified linesdef predict_regression(image):# Preprocess imageimage = Image.fromarray(image.astype('uint8')) # Convert numpy array to PIL imageimage = image.resize((28, 28)).convert('L') #resize the image to 28x28 and converts it to gray scaleimage = np.array(image)print(image.shape)# Predict19 unmodified lines2021222324252619 unmodified linesdef predict_regression(image):# Preprocess imageimage = Image.fromarray(image.astype('uint8')) # Convert numpy array to PIL imageimage = image.resize((150, 150)).convert('L') #resize the image to 150x150 and converts it to gray scaleimage = np.array(image)print(image.shape)# Predict
app.py+1-1