Update app.py
Browse files
app.py
CHANGED
@@ -8,6 +8,7 @@ import keras
|
|
8 |
from keras.applications.vgg16 import preprocess_input
|
9 |
from tensorflow.keras.applications.vgg16 import preprocess_input
|
10 |
import gradio as gr
|
|
|
11 |
|
12 |
def model(img):
|
13 |
model_dir = 'cataract'
|
@@ -33,7 +34,8 @@ def model(img):
|
|
33 |
loaded_model.summary()
|
34 |
# Load and preprocess the image
|
35 |
try:
|
36 |
-
image = img.convert(channel).resize((256, 256))
|
|
|
37 |
except:
|
38 |
print("ERROR")
|
39 |
print(image)
|
|
|
8 |
from keras.applications.vgg16 import preprocess_input
|
9 |
from tensorflow.keras.applications.vgg16 import preprocess_input
|
10 |
import gradio as gr
|
11 |
+
import cv2
|
12 |
|
13 |
def model(img):
|
14 |
model_dir = 'cataract'
|
|
|
34 |
loaded_model.summary()
|
35 |
# Load and preprocess the image
|
36 |
try:
|
37 |
+
# image = img.convert(channel).resize((256, 256))
|
38 |
+
image = cv2.resize(img, (256, 256))
|
39 |
except:
|
40 |
print("ERROR")
|
41 |
print(image)
|