update app.py
Browse files
app.py
CHANGED
@@ -129,7 +129,7 @@ with gr.Blocks(title="Brain tumor 3D segmentation with MONAIMNIST - ClassCat",
|
|
129 |
|
130 |
gr.HTML("""<div style="font-family:'Times New Roman', 'Serif'; font-size:16pt; font-weight:bold; text-align:center; color:royalblue;">Brain tumor 3D segmentation with MONAI</div>""")
|
131 |
|
132 |
-
gr.HTML("""<h4 style="color:navy;">1. Select an example, which includes input images and label images.</h4>""")
|
133 |
|
134 |
with gr.Row():
|
135 |
input_image0 = gr.Image(label="image channel 0", type="pil", shape=(240, 240))
|
@@ -179,16 +179,14 @@ with gr.Blocks(title="Brain tumor 3D segmentation with MONAIMNIST - ClassCat",
|
|
179 |
outputs=[sample_index, input_image0, input_image1, input_image2, input_image3,
|
180 |
label_image0, label_image1, label_image2])
|
181 |
|
|
|
|
|
182 |
with gr.Row():
|
183 |
output_image0 = gr.Image(label="output channel 0", type="pil")
|
184 |
output_image1 = gr.Image(label="output channel 1", type="pil")
|
185 |
output_image2 = gr.Image(label="output channel 2", type="pil")
|
186 |
-
|
187 |
-
#output_label=gr.Label(label="予測確率", num_top_classes=3)
|
188 |
|
189 |
-
send_btn = gr.Button("
|
190 |
-
|
191 |
-
#gr.Examples(['2.png', '4.png'], inputs=input_image2)
|
192 |
|
193 |
send_btn.click(fn=predict, inputs=[sample_index], outputs=[output_image0, output_image1, output_image2])
|
194 |
|
|
|
129 |
|
130 |
gr.HTML("""<div style="font-family:'Times New Roman', 'Serif'; font-size:16pt; font-weight:bold; text-align:center; color:royalblue;">Brain tumor 3D segmentation with MONAI</div>""")
|
131 |
|
132 |
+
gr.HTML("""<h4 style="color:navy;">1. Select an example, which includes input images and label images, by clicking "Example x" button.</h4>""")
|
133 |
|
134 |
with gr.Row():
|
135 |
input_image0 = gr.Image(label="image channel 0", type="pil", shape=(240, 240))
|
|
|
179 |
outputs=[sample_index, input_image0, input_image1, input_image2, input_image3,
|
180 |
label_image0, label_image1, label_image2])
|
181 |
|
182 |
+
gr.HTML("""<p><h4>2. Then, click "Infer" button to predict segmentation images. It will take about 30 seconds (on cpu)</h4>""")
|
183 |
+
|
184 |
with gr.Row():
|
185 |
output_image0 = gr.Image(label="output channel 0", type="pil")
|
186 |
output_image1 = gr.Image(label="output channel 1", type="pil")
|
187 |
output_image2 = gr.Image(label="output channel 2", type="pil")
|
|
|
|
|
188 |
|
189 |
+
send_btn = gr.Button("Infer")
|
|
|
|
|
190 |
|
191 |
send_btn.click(fn=predict, inputs=[sample_index], outputs=[output_image0, output_image1, output_image2])
|
192 |
|