mostafapasha commited on
Commit
5f3c0c5
1 Parent(s): f3ff7e0

updates files

Browse files
Files changed (1) hide show
  1. app.py +2 -6
app.py CHANGED
@@ -22,14 +22,10 @@ def infer(img, threshold):
22
  pred = np.array(pred.numpy())[0,:,:,0]
23
  return pred
24
 
25
- gr_input = [
26
- gr.inputs.Image(label="Image", type="numpy", shape=(512, 512))
27
- ,gr.inputs.Slider(minimum=0, maximum=1, step=0.05, default=0.5, label="Segmentation Threshold")
28
  ]
29
 
30
- gr_output = [
31
- gr.outputs.Image(type="pil",label="Segmentation Mask"),
32
- # gr.outputs.Image(type="pil",label="Filtered Image"),
33
  ]
34
 
35
  iface = gr.Interface(fn=infer, title='ribs segmentation model', description='Keras implementation of ResUNET++ for xray ribs segmentation', inputs=gr_input, outputs=gr_output, examples=examples, flagging_dir="flagged").launch(cache_examples=True)
 
22
  pred = np.array(pred.numpy())[0,:,:,0]
23
  return pred
24
 
25
+ gr_input = [gr.inputs.Image(label="Image", type="numpy", shape=(512, 512)), gr.inputs.Slider(minimum=0, maximum=1, step=0.05, default=0.5, label="Segmentation Threshold")
 
 
26
  ]
27
 
28
+ gr_output = [gr.outputs.Image(type="pil",label="Segmentation Mask"),
 
 
29
  ]
30
 
31
  iface = gr.Interface(fn=infer, title='ribs segmentation model', description='Keras implementation of ResUNET++ for xray ribs segmentation', inputs=gr_input, outputs=gr_output, examples=examples, flagging_dir="flagged").launch(cache_examples=True)