mostafapasha commited on
Commit
c5cc62d
·
1 Parent(s): 02df9c9

updates files

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -10,6 +10,7 @@ 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,4 +29,4 @@ gr_input = [gr.inputs.Image(label="Image", type="numpy", shape=(512, 512)), gr.i
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)
 
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
  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)