Spaces:
Runtime error
Runtime error
Commit
·
02df9c9
1
Parent(s):
9ad97f8
updates files
Browse files
app.py
CHANGED
@@ -9,6 +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 |
|
13 |
|
14 |
def infer(img, threshold):
|
@@ -27,4 +28,4 @@ gr_input = [gr.inputs.Image(label="Image", type="numpy", shape=(512, 512)), gr.i
|
|
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=
|
|
|
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(cache_examples=True)
|