mostafapasha commited on
Commit
2ba8ba6
·
1 Parent(s): c5cc62d

updates files

Browse files
Files changed (1) hide show
  1. app.py +2 -3
app.py CHANGED
@@ -9,8 +9,7 @@ import sys
9
  print('Loading model...')
10
  model = from_pretrained_keras("mostafapasha/ribs-segmentation-model", compile=False)
11
  print('Successfully loaded model...')
12
- # examples = ['examples/VinDr_RibCXR_train_008.png', 'examples/VinDr_RibCXR_train_013.png']
13
- examples = os.path.abspath('examples')
14
 
15
 
16
  def infer(img, threshold):
@@ -29,4 +28,4 @@ gr_input = [gr.inputs.Image(label="Image", type="numpy", shape=(512, 512)), gr.i
29
  gr_output = [gr.outputs.Image(type="pil",label="Segmentation Mask"),
30
  ]
31
 
32
- 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)
 
9
  print('Loading model...')
10
  model = from_pretrained_keras("mostafapasha/ribs-segmentation-model", compile=False)
11
  print('Successfully loaded model...')
12
+ examples = ['examples/VinDr_RibCXR_train_008.png', 'examples/VinDr_RibCXR_train_013.png']
 
13
 
14
 
15
  def infer(img, threshold):
 
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()