Spaces:
Build error
Build error
Update examples in app.py
Browse files
app.py
CHANGED
@@ -16,9 +16,12 @@ from monai.transforms import (
|
|
16 |
BUNDLE_NAME = 'spleen_ct_segmentation_v0.1.0'
|
17 |
BUNDLE_PATH = os.path.join(torch.hub.get_dir(), 'bundle', BUNDLE_NAME)
|
18 |
|
19 |
-
|
20 |
-
|
21 |
-
|
|
|
|
|
|
|
22 |
|
23 |
model, _, _ = bundle.load(
|
24 |
name = BUNDLE_NAME,
|
@@ -73,6 +76,7 @@ def predict(input_file, z_axis, model=model, device=device):
|
|
73 |
|
74 |
return input_t1c_image, pred_1_image, z_axis
|
75 |
|
|
|
76 |
iface = gr.Interface(
|
77 |
fn=predict,
|
78 |
inputs=[
|
@@ -83,7 +87,8 @@ iface = gr.Interface(
|
|
83 |
gr.Image(label='input image'),
|
84 |
gr.Image(label='segmentation'),
|
85 |
gr.Slider(0, 200, label='z-axis', value=100)],
|
86 |
-
title=
|
|
|
87 |
examples=examples,
|
88 |
)
|
89 |
|
|
|
16 |
BUNDLE_NAME = 'spleen_ct_segmentation_v0.1.0'
|
17 |
BUNDLE_PATH = os.path.join(torch.hub.get_dir(), 'bundle', BUNDLE_NAME)
|
18 |
|
19 |
+
title = "Segment Brain Tumors with MONAI!"
|
20 |
+
description = """
|
21 |
+
|
22 |
+
"""
|
23 |
+
|
24 |
+
examples = 'examples/'
|
25 |
|
26 |
model, _, _ = bundle.load(
|
27 |
name = BUNDLE_NAME,
|
|
|
76 |
|
77 |
return input_t1c_image, pred_1_image, z_axis
|
78 |
|
79 |
+
|
80 |
iface = gr.Interface(
|
81 |
fn=predict,
|
82 |
inputs=[
|
|
|
87 |
gr.Image(label='input image'),
|
88 |
gr.Image(label='segmentation'),
|
89 |
gr.Slider(0, 200, label='z-axis', value=100)],
|
90 |
+
title=title,
|
91 |
+
description=description,
|
92 |
examples=examples,
|
93 |
)
|
94 |
|