yuragoithf commited on
Commit
c97d496
·
1 Parent(s): 8af4e5b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -49,6 +49,7 @@ def dice_coef(y_true, y_pred, smooth=1):
49
  seg_model = tf.keras.models.load_model('seg_unet_model.h5', custom_objects={'Combo_loss': Combo_loss, 'dice_coef': dice_coef})
50
 
51
  inputs = gr.inputs.Image(type="pil", label="Upload an image")
 
52
  # outputs = gr.outputs.HTML() #uncomment for single class output
53
 
54
  def gen_pred(img=inputs, model=seg_model):
@@ -74,7 +75,7 @@ description = "Upload an image and get prediction mask"
74
 
75
  gr.Interface(fn=gen_pred,
76
  inputs=inputs,
77
- outputs=gr.components.Image(),
78
  title=title,
79
  examples=[["003e2c95d.jpg"], ["003b50a15.jpg"], ["003b48a9e.jpg"], ["0038cbe45.jpg"], ["00371aa92.jpg"]],
80
  # css=css_code,
 
49
  seg_model = tf.keras.models.load_model('seg_unet_model.h5', custom_objects={'Combo_loss': Combo_loss, 'dice_coef': dice_coef})
50
 
51
  inputs = gr.inputs.Image(type="pil", label="Upload an image")
52
+ image_output = gr.Image()
53
  # outputs = gr.outputs.HTML() #uncomment for single class output
54
 
55
  def gen_pred(img=inputs, model=seg_model):
 
75
 
76
  gr.Interface(fn=gen_pred,
77
  inputs=inputs,
78
+ outputs=image_output,
79
  title=title,
80
  examples=[["003e2c95d.jpg"], ["003b50a15.jpg"], ["003b48a9e.jpg"], ["0038cbe45.jpg"], ["00371aa92.jpg"]],
81
  # css=css_code,