Commit
·
b1a6758
1
Parent(s):
5b13053
Update app.py
Browse files
app.py
CHANGED
|
@@ -23,6 +23,9 @@ class_labels = ['Normal', 'Pneumonia']
|
|
| 23 |
|
| 24 |
# Create a function to preprocess the image
|
| 25 |
def preprocess_image(image):
|
|
|
|
|
|
|
|
|
|
| 26 |
# Resize the image to match the model's input shape
|
| 27 |
image = image.resize((224, 224))
|
| 28 |
|
|
|
|
| 23 |
|
| 24 |
# Create a function to preprocess the image
|
| 25 |
def preprocess_image(image):
|
| 26 |
+
# Convert the image to RGB
|
| 27 |
+
image = image.convert('RGB')
|
| 28 |
+
|
| 29 |
# Resize the image to match the model's input shape
|
| 30 |
image = image.resize((224, 224))
|
| 31 |
|