merve HF Staff commited on
Commit
5eaa7c9
·
1 Parent(s): 44bfb26

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -10,12 +10,12 @@ inputs = gr.inputs.Image()
10
  output = gr.outputs.Image()
11
 
12
 
13
- def predict(image_input):
14
  img = np.array(inputs)
15
 
16
  im = tf.image.resize(img, (128, 128))
17
  im = tf.cast(im, tf.float32) / 255.0
18
- pred_mask = self.model.predict(im[tf.newaxis, ...])
19
 
20
  # take the best performing class for each pixel
21
  # the output of argmax looks like this [[1, 2, 0], ...]
 
10
  output = gr.outputs.Image()
11
 
12
 
13
+ def predict(inputs):
14
  img = np.array(inputs)
15
 
16
  im = tf.image.resize(img, (128, 128))
17
  im = tf.cast(im, tf.float32) / 255.0
18
+ pred_mask = model.predict(im[tf.newaxis, ...])
19
 
20
  # take the best performing class for each pixel
21
  # the output of argmax looks like this [[1, 2, 0], ...]