TibbtechUser commited on
Commit
6c42951
·
verified ·
1 Parent(s): 6693787

Upload app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -6
app.py CHANGED
@@ -473,10 +473,11 @@ gallery_images = natsorted(load_gallery_images())
473
  with gr.Blocks() as demo:
474
  gr.Markdown("# Map My Sections\n### This GUI is part of the submission to the Allen Institute's Map My Sections tool by Tibbling Technologies.")
475
 
476
- gr.Markdown("### Step 1: Upload your sample and choose type")
477
  with gr.Row():
478
  nifti_file = gr.File(label="File Upload")
479
  with gr.Column():
 
480
  sample_type = gr.Dropdown(choices=["CCF registered Sample", "Custom Sample"], value="CCF registered Sample", label="Sample Type")
481
  data_type = gr.Radio(choices=["2D", "3D"], value="3D", label="Data Type")
482
 
@@ -484,21 +485,21 @@ with gr.Blocks() as demo:
484
 
485
  with gr.Row(visible=False) as slice_row:
486
  with gr.Column(scale=1):
487
- gr.Markdown("### Step 2: Visualizing your uploaded sample")
488
  image_display = gr.Image(height=450)
489
  slice_slider = gr.Slider(minimum=0, maximum=0, value=0, step=1, label="Slices", visible=False)
490
  with gr.Column(scale=1):
491
- gr.Markdown("### Step 3: Visualizing Allen Brain Cell Types Atlas")
492
  gallery = gr.Gallery(label="ABC Atlas", value = gallery_images,columns = 5, height = 450)
493
- gr.Markdown("**Step 4: Run cell type mapping**")
494
  with gr.Row():
495
  run_button = gr.Button("Run Mapping")
496
  reg_button = gr.Button("Run Registration", visible=False)
497
 
498
  with gr.Column(visible=False) as plot_row:
499
- gr.Markdown("### Step 5: Quantitative results of the mapping model.")
500
  prob_plot = gr.BarPlot(prob_df, x="labels", y="values", title="Cell Type Probabilities", scroll_to_output=True, x_label_angle=-90, height=400)
501
- download_step = gr.Markdown("### Step 6: Download Results.", visible = False)
502
  download_button = gr.DownloadButton(label="Download Results", visible = False)
503
 
504
  nifti_file.change(
 
473
  with gr.Blocks() as demo:
474
  gr.Markdown("# Map My Sections\n### This GUI is part of the submission to the Allen Institute's Map My Sections tool by Tibbling Technologies.")
475
 
476
+ gr.Markdown("### Step 1: Upload your sample, currently only .nii.gz and .png supported")
477
  with gr.Row():
478
  nifti_file = gr.File(label="File Upload")
479
  with gr.Column():
480
+ gr.Markdown("### Step 2: Select your sample and data type.")
481
  sample_type = gr.Dropdown(choices=["CCF registered Sample", "Custom Sample"], value="CCF registered Sample", label="Sample Type")
482
  data_type = gr.Radio(choices=["2D", "3D"], value="3D", label="Data Type")
483
 
 
485
 
486
  with gr.Row(visible=False) as slice_row:
487
  with gr.Column(scale=1):
488
+ gr.Markdown("### Step 3: Visualizing your uploaded sample")
489
  image_display = gr.Image(height=450)
490
  slice_slider = gr.Slider(minimum=0, maximum=0, value=0, step=1, label="Slices", visible=False)
491
  with gr.Column(scale=1):
492
+ gr.Markdown("### Step 4: Visualizing Allen Brain Cell Types Atlas")
493
  gallery = gr.Gallery(label="ABC Atlas", value = gallery_images,columns = 5, height = 450)
494
+ gr.Markdown("### Step 5: Run cell type mappin and/or registeration. ")
495
  with gr.Row():
496
  run_button = gr.Button("Run Mapping")
497
  reg_button = gr.Button("Run Registration", visible=False)
498
 
499
  with gr.Column(visible=False) as plot_row:
500
+ gr.Markdown("### Step 6: Quantitative results of the mapping model.")
501
  prob_plot = gr.BarPlot(prob_df, x="labels", y="values", title="Cell Type Probabilities", scroll_to_output=True, x_label_angle=-90, height=400)
502
+ download_step = gr.Markdown("### Step 7: Download Results.", visible = False)
503
  download_button = gr.DownloadButton(label="Download Results", visible = False)
504
 
505
  nifti_file.change(