kamau1 commited on
Commit
b3b1218
·
1 Parent(s): 9f1871e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
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(i).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,7 +23,7 @@ description = (
23
  ""
24
  )
25
 
26
- examples = glob.glob("images/*.png")
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,