katielink commited on
Commit
4e75bca
·
1 Parent(s): 5e59526

Better button formatting and title centering

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -18,7 +18,7 @@ BUNDLE_NAME = 'spleen_ct_segmentation_v0.1.0'
18
  BUNDLE_PATH = os.path.join(torch.hub.get_dir(), 'bundle', BUNDLE_NAME)
19
 
20
  # Title and description
21
- title = "# Segment Brain Tumors with MONAI! 🧠"
22
  description = """
23
  ## To run 🚀
24
 
@@ -129,15 +129,15 @@ with gr.Blocks() as demo:
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
- # Show the button with custom label
134
- button = gr.Button("Segment Tumor!")
135
 
136
  with gr.Column():
137
  # Show the input image with different MR sequences
138
  input_image = gr.Gallery(label='input MRI sequences (T1+, T1, T2, FLAIR)')
139
  output_segmentation = gr.Gallery(label='output segmentations (TC, EC, WT)')
140
 
 
 
 
141
  # Run prediction on button click
142
  button.click(
143
  predict,
 
18
  BUNDLE_PATH = os.path.join(torch.hub.get_dir(), 'bundle', BUNDLE_NAME)
19
 
20
  # Title and description
21
+ title = '<h1 style="text-align: center;">Segment Brain Tumors with MONAI! 🧠 </h1>'
22
  description = """
23
  ## To run 🚀
24
 
 
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(
143
  predict,