Update app.py
Browse files
app.py
CHANGED
@@ -11,7 +11,7 @@ feature_extractor = ViTFeatureExtractor.from_pretrained("google/vit-base-patch16
|
|
11 |
|
12 |
def classify_image(image):
|
13 |
# Convert the PIL Image to a format compatible with the feature extractor
|
14 |
-
|
15 |
# Preprocess the image and prepare it for the model
|
16 |
inputs_pneumonia = feature_extractor(images=image, return_tensors="pt")
|
17 |
# Make prediction
|
|
|
11 |
|
12 |
def classify_image(image):
|
13 |
# Convert the PIL Image to a format compatible with the feature extractor
|
14 |
+
image = np.array(image)
|
15 |
# Preprocess the image and prepare it for the model
|
16 |
inputs_pneumonia = feature_extractor(images=image, return_tensors="pt")
|
17 |
# Make prediction
|