Spaces:
Runtime error
Runtime error
Commit
·
8e4548c
1
Parent(s):
5484739
updates files
Browse files
app.py
CHANGED
@@ -9,7 +9,6 @@ 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 |
|
14 |
|
15 |
def infer(img, threshold):
|
@@ -28,4 +27,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, flagging_dir="flagged").launch()
|
|
|
9 |
print('Loading model...')
|
10 |
model = from_pretrained_keras("mostafapasha/ribs-segmentation-model", compile=False)
|
11 |
print('Successfully loaded model...')
|
|
|
12 |
|
13 |
|
14 |
def infer(img, threshold):
|
|
|
27 |
gr_output = [gr.outputs.Image(type="pil",label="Segmentation Mask"),
|
28 |
]
|
29 |
|
30 |
+
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/VinDr_RibCXR_train_008.png'], ['examples/VinDr_RibCXR_train_013.png']], flagging_dir="flagged").launch(cache_examples=True)
|