Spaces:
Running
Running
minor update
Browse files
app.py
CHANGED
@@ -296,8 +296,8 @@ def atlas_slice_prediction(user_section, axis = 'coronal'):
|
|
296 |
user_section = square_padding(user_section, 224)
|
297 |
user_section = (user_section - np.min(user_section))/((np.max(user_section) - np.min(user_section)))
|
298 |
print("Loading model")
|
299 |
-
atlas_embeddings = np.load(f"registration/
|
300 |
-
atlas_labels = np.load(f"registration/
|
301 |
idx = embeddings_classifier(user_section, atlas_embeddings,atlas_labels)
|
302 |
|
303 |
return idx
|
@@ -475,7 +475,7 @@ with gr.Blocks() as demo:
|
|
475 |
gr.Markdown("### Step 1: Upload your sample and choose type")
|
476 |
with gr.Row():
|
477 |
nifti_file = gr.File(label="File Upload")
|
478 |
-
with gr.
|
479 |
sample_type = gr.Dropdown(choices=["CCF registered Sample", "Custom Sample"], value="CCF registered Sample", label="Sample Type")
|
480 |
data_type = gr.Radio(choices=["2D", "3D"], value="3D", label="Data Type")
|
481 |
|
|
|
296 |
user_section = square_padding(user_section, 224)
|
297 |
user_section = (user_section - np.min(user_section))/((np.max(user_section) - np.min(user_section)))
|
298 |
print("Loading model")
|
299 |
+
atlas_embeddings = np.load(f"registration/atlas_embeddings_{axis}.npy")
|
300 |
+
atlas_labels = np.load(f"registration/atlas_labels_{axis}.npy")
|
301 |
idx = embeddings_classifier(user_section, atlas_embeddings,atlas_labels)
|
302 |
|
303 |
return idx
|
|
|
475 |
gr.Markdown("### Step 1: Upload your sample and choose type")
|
476 |
with gr.Row():
|
477 |
nifti_file = gr.File(label="File Upload")
|
478 |
+
with gr.Column():
|
479 |
sample_type = gr.Dropdown(choices=["CCF registered Sample", "Custom Sample"], value="CCF registered Sample", label="Sample Type")
|
480 |
data_type = gr.Radio(choices=["2D", "3D"], value="3D", label="Data Type")
|
481 |
|