katielink commited on
Commit
2aa8f6b
1 Parent(s): 7d7f987

Reformat block layout

Browse files
Files changed (1) hide show
  1. app.py +16 -11
app.py CHANGED
@@ -22,7 +22,7 @@ title = '<h1 style="text-align: center;">Segment Brain Tumors with MONAI! 🧠 <
22
  description = """
23
  ## To run 🚀
24
 
25
- Upload a image file in the format: 4 channel MRI (4 aligned MRIs T1c, T1, T2, FLAIR at 1x1x1 mm), or try out one of the examples below!
26
  If you want to see a different slice, update the slider and click the button.
27
 
28
  More details on the model can be found [here!](https://huggingface.co/katielink/brats_mri_segmentation_v0.1.0)
@@ -41,7 +41,7 @@ references = """
41
  """
42
 
43
  examples = [
44
- ['examples/BRATS_485.nii.gz', 100],
45
  ['examples/BRATS_486.nii.gz', 100]
46
  ]
47
 
@@ -125,18 +125,23 @@ with gr.Blocks() as demo:
125
  gr.Markdown(description)
126
 
127
  with gr.Row():
128
- with gr.Column():
129
- # Get the input file and slice slider as inputs
130
- input_file = gr.File(label='input file')
131
- z_axis = gr.Slider(0, 200, label='z-axis', value=50)
132
-
 
 
 
 
133
  with gr.Column():
134
  # Show the input image with different MR sequences
135
  input_image = gr.Gallery(label='input MRI sequences (T1+, T1, T2, FLAIR)')
136
- output_segmentation = gr.Gallery(label='output segmentations (TC, EC, WT)')
137
-
138
- # Show the button with custom label
139
- button = gr.Button("Segment Tumor!")
 
140
 
141
  # Run prediction on button click
142
  button.click(
 
22
  description = """
23
  ## To run 🚀
24
 
25
+ Upload a brain MRI image file, or try out one of the examples below!
26
  If you want to see a different slice, update the slider and click the button.
27
 
28
  More details on the model can be found [here!](https://huggingface.co/katielink/brats_mri_segmentation_v0.1.0)
 
41
  """
42
 
43
  examples = [
44
+ ['examples/BRATS_485.nii.gz', 65],
45
  ['examples/BRATS_486.nii.gz', 100]
46
  ]
47
 
 
125
  gr.Markdown(description)
126
 
127
  with gr.Row():
128
+ # Get the input file and slice slider as inputs
129
+ input_file = gr.File(label='input file')
130
+ z_axis = gr.Slider(0, 200, label='z-axis', value=50)
131
+
132
+ with gr.Row():
133
+ # Show the button with custom label
134
+ button = gr.Button("Segment Tumor!")
135
+
136
+ with gr.Row():
137
  with gr.Column():
138
  # Show the input image with different MR sequences
139
  input_image = gr.Gallery(label='input MRI sequences (T1+, T1, T2, FLAIR)')
140
+
141
+ with gr.Column():
142
+ # Show the segmentation labels
143
+ output_segmentation = gr.Gallery(label='output segmentations (TC, WT, ET)')
144
+
145
 
146
  # Run prediction on button click
147
  button.click(