Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -10,7 +10,7 @@ model = tf.saved_model.load(model_path)
|
|
10 |
classes = [ "bleached" , "healthy" , ]
|
11 |
|
12 |
def run(image_path):
|
13 |
-
img = Image.open(
|
14 |
img = img.resize((300, 300 * img.size[1] // img.size[0]), Image.ANTIALIAS)
|
15 |
inp_numpy = np.array(img)[None]
|
16 |
inp = tf.constant(inp_numpy, dtype='float32')
|
@@ -23,7 +23,7 @@ description = (
|
|
23 |
""
|
24 |
)
|
25 |
|
26 |
-
examples = glob.glob("images/*.
|
27 |
|
28 |
interface = gr.Interface(
|
29 |
run,
|
|
|
10 |
classes = [ "bleached" , "healthy" , ]
|
11 |
|
12 |
def run(image_path):
|
13 |
+
img = Image.open(image_path).convert('RGB')
|
14 |
img = img.resize((300, 300 * img.size[1] // img.size[0]), Image.ANTIALIAS)
|
15 |
inp_numpy = np.array(img)[None]
|
16 |
inp = tf.constant(inp_numpy, dtype='float32')
|
|
|
23 |
""
|
24 |
)
|
25 |
|
26 |
+
examples = glob.glob("images/*.jpg")
|
27 |
|
28 |
interface = gr.Interface(
|
29 |
run,
|