yuragoithf commited on
Commit
67680bf
·
1 Parent(s): 1d6c9fa

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -54,6 +54,8 @@ seg_model = keras.models.load_model('seg_unet_model.h5', custom_objects={'Combo_
54
  image_output = gr.outputs.Image(type="pil", label="Output Image")
55
  # outputs = gr.outputs.HTML() #uncomment for single class output
56
 
 
 
57
 
58
  def gen_pred(img, model=seg_model):
59
  # pil_image = img.convert('RGB')
@@ -67,7 +69,7 @@ def gen_pred(img, model=seg_model):
67
  pred = model.predict(img)
68
  pred = np.squeeze(pred, axis=0)
69
  fig = plt.figure(figsize=(10, 7))
70
- fig.add_subplot(rows=1, columns=1, 1)
71
  plt.imshow(pred, interpolation='catrom')
72
  plt.axis('off')
73
  plt.title("Prediction")
 
54
  image_output = gr.outputs.Image(type="pil", label="Output Image")
55
  # outputs = gr.outputs.HTML() #uncomment for single class output
56
 
57
+ rows = 1
58
+ columns = 1
59
 
60
  def gen_pred(img, model=seg_model):
61
  # pil_image = img.convert('RGB')
 
69
  pred = model.predict(img)
70
  pred = np.squeeze(pred, axis=0)
71
  fig = plt.figure(figsize=(10, 7))
72
+ fig.add_subplot(rows, columns, 1)
73
  plt.imshow(pred, interpolation='catrom')
74
  plt.axis('off')
75
  plt.title("Prediction")