mostafapasha commited on
Commit
b503ff5
·
1 Parent(s): 544b3f6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -8,7 +8,7 @@ import sys
8
  print('Loading model...')
9
  model = from_pretrained_keras("mostafapasha/ribs-segmentation-model", compile=False)
10
  print('Successfully loaded model...')
11
- examples = ['examples/VinDr_RibCXR_val_008.png', 'examples/VinDr_RibCXR_val_013.png']
12
 
13
 
14
  def segment(img_arr):
@@ -21,4 +21,4 @@ def segment(img_arr):
21
  pred = tf.cast(prob > threshold, dtype=tf.float32)
22
  pred = np.array(pred.numpy())[0,:,:,0]
23
  return pred
24
- iface = gr.Interface(fn=segment, inputs=gr.inputs.Image(shape=(512, 512)), outputs="image", flagging_dir="flagged").launch(share=True)
 
8
  print('Loading model...')
9
  model = from_pretrained_keras("mostafapasha/ribs-segmentation-model", compile=False)
10
  print('Successfully loaded model...')
11
+ examples = ['VinDr_RibCXR_val_008.png', 'VinDr_RibCXR_val_013.png']
12
 
13
 
14
  def segment(img_arr):
 
21
  pred = tf.cast(prob > threshold, dtype=tf.float32)
22
  pred = np.array(pred.numpy())[0,:,:,0]
23
  return pred
24
+ iface = gr.Interface(fn=segment, inputs=gr.inputs.Image(shape=(512, 512)), outputs="image", flagging_dir="flagged").launch(debug=True, cache_examples=True)