Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -11,7 +11,7 @@ IMG_SIZE = (300, 300)
|
|
11 |
|
12 |
# Function to preprocess the image
|
13 |
def preprocess_image(image):
|
14 |
-
image = image.resize(IMG_SIZE, Image.
|
15 |
inp_numpy = np.array(image)[None]
|
16 |
inp = tf.constant(inp_numpy, dtype='float32')
|
17 |
return inp
|
|
|
11 |
|
12 |
# Function to preprocess the image
|
13 |
def preprocess_image(image):
|
14 |
+
image = image.resize(IMG_SIZE, Image.LANCZOS) # Updated to use Image.LANCZOS
|
15 |
inp_numpy = np.array(image)[None]
|
16 |
inp = tf.constant(inp_numpy, dtype='float32')
|
17 |
return inp
|