mathpluscode commited on
Commit
7373d19
·
1 Parent(s): 6893ed9

Fix requirements

Browse files
Files changed (2) hide show
  1. app.py +7 -4
  2. requirements.txt +0 -1
app.py CHANGED
@@ -6,7 +6,10 @@ import torch
6
  from monai.transforms import Compose, ScaleIntensityd, SpatialPadd
7
  from cinema import ConvUNetR
8
  from pathlib import Path
9
- from examples.inference.segmentation_sax import plot_segmentations, plot_volume_changes
 
 
 
10
  import spaces
11
 
12
  # cache directories
@@ -112,7 +115,7 @@ with gr.Blocks(
112
  )
113
 
114
  with gr.Row():
115
- with gr.Column(scale=0.4):
116
  gr.Markdown("## Description")
117
  gr.Markdown("""
118
  Please adjust the settings on the right panels and click the button to run the inference.
@@ -131,7 +134,7 @@ with gr.Blocks(
131
  The left panel shows the segmentation of ventricles and myocardium every n time steps across all SAX slices.
132
  The right panel plots the ventricle and mycoardium volumes across all inference time frames.
133
  """)
134
- with gr.Column(scale=0.3):
135
  gr.Markdown("## Data Settings")
136
  image_id = gr.Slider(
137
  minimum=1,
@@ -147,7 +150,7 @@ with gr.Blocks(
147
  label="Choose the gap between time frames",
148
  value=2,
149
  )
150
- with gr.Column(scale=0.3):
151
  gr.Markdown("## Model Setting")
152
  trained_dataset = gr.Dropdown(
153
  choices=["ACDC", "M&MS", "M&MS2"],
 
6
  from monai.transforms import Compose, ScaleIntensityd, SpatialPadd
7
  from cinema import ConvUNetR
8
  from pathlib import Path
9
+ from cinema.examples.inference.segmentation_sax import (
10
+ plot_segmentations,
11
+ plot_volume_changes,
12
+ )
13
  import spaces
14
 
15
  # cache directories
 
115
  )
116
 
117
  with gr.Row():
118
+ with gr.Column(scale=4):
119
  gr.Markdown("## Description")
120
  gr.Markdown("""
121
  Please adjust the settings on the right panels and click the button to run the inference.
 
134
  The left panel shows the segmentation of ventricles and myocardium every n time steps across all SAX slices.
135
  The right panel plots the ventricle and mycoardium volumes across all inference time frames.
136
  """)
137
+ with gr.Column(scale=3):
138
  gr.Markdown("## Data Settings")
139
  image_id = gr.Slider(
140
  minimum=1,
 
150
  label="Choose the gap between time frames",
151
  value=2,
152
  )
153
+ with gr.Column(scale=3):
154
  gr.Markdown("## Model Setting")
155
  trained_dataset = gr.Dropdown(
156
  choices=["ACDC", "M&MS", "M&MS2"],
requirements.txt CHANGED
@@ -19,6 +19,5 @@ spaces==0.36.0
19
  timm==1.0.15
20
  wandb==0.19.11
21
  git+https://github.com/mathpluscode/CineMA#egg=cinema
22
- git+https://github.com/mathpluscode/CineMA#egg=examples
23
  --extra-index-url https://download.pytorch.org/whl/cu113
24
  torch==2.5.1
 
19
  timm==1.0.15
20
  wandb==0.19.11
21
  git+https://github.com/mathpluscode/CineMA#egg=cinema
 
22
  --extra-index-url https://download.pytorch.org/whl/cu113
23
  torch==2.5.1