tlucch commited on
Commit
a97a6b4
·
1 Parent(s): 8623c4c

fix repo_id name

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -80,7 +80,7 @@ with st.container():
80
  if st.session_state.clicked_pp:
81
  if st.session_state.clicked_pred == False:
82
  with st.container():
83
- pred_image = nib.load(hf_hub_download(repo_id= "rootstrap/Alzheimer-Classifier-Demo", repo_type="dataset", subfolder="preprocessed", filename = img_path + ".nii.gz"))
84
 
85
  bounds_pred = plotting.find_cuts._get_auto_mask_bounds(pred_image)
86
 
@@ -94,7 +94,7 @@ with st.container():
94
 
95
  else:
96
  with st.container():
97
- pred_image = nib.load(hf_hub_download(repo_id= "rootstrap/Alzheimer-Classifier-Demo", repo_type="dataset", subfolder="preprocessed", filename = img_path + ".nii.gz"))
98
 
99
  bounds_pred = plotting.find_cuts._get_auto_mask_bounds(pred_image)
100
 
@@ -103,7 +103,7 @@ with st.container():
103
  x_value_pred = st.sidebar.slider('Move the slider to adjust the sagittal cut ', bounds_pred[0][0], bounds_pred[0][1], mean([bounds_pred[0][0], bounds_pred[0][1]]))
104
  z_value_pred = st.sidebar.slider('Move the slider to adjust the axial cut ', bounds_pred[2][0], bounds_pred[2][1], mean([bounds_pred[2][0], bounds_pred[2][1]]))
105
 
106
- img_array = load_img(hf_hub_download(repo_id= "rootstrap/Alzheimer-Classifier-Demo", repo_type="dataset", subfolder="preprocessed", filename = img_path + ".nii.gz"))
107
  new_data = transforms(img_array)
108
  new_data_tensor = torch.from_numpy(np.array([new_data]))
109
 
@@ -145,7 +145,7 @@ with st.container():
145
  st.pyplot()
146
 
147
  else:
148
- raw_image = nib.load(hf_hub_download(repo_id= "rootstrap/Alzheimer-Classifier-Demo", repo_type="dataset", subfolder="raw", filename = img_path + ".nii"))
149
 
150
  bounds_raw = plotting.find_cuts._get_auto_mask_bounds(raw_image)
151
 
 
80
  if st.session_state.clicked_pp:
81
  if st.session_state.clicked_pred == False:
82
  with st.container():
83
+ pred_image = nib.load(hf_hub_download(repo_id= "rootstrap-org/Alzheimer-Classifier-Demo", repo_type="dataset", subfolder="preprocessed", filename = img_path + ".nii.gz"))
84
 
85
  bounds_pred = plotting.find_cuts._get_auto_mask_bounds(pred_image)
86
 
 
94
 
95
  else:
96
  with st.container():
97
+ pred_image = nib.load(hf_hub_download(repo_id= "rootstrap-org/Alzheimer-Classifier-Demo", repo_type="dataset", subfolder="preprocessed", filename = img_path + ".nii.gz"))
98
 
99
  bounds_pred = plotting.find_cuts._get_auto_mask_bounds(pred_image)
100
 
 
103
  x_value_pred = st.sidebar.slider('Move the slider to adjust the sagittal cut ', bounds_pred[0][0], bounds_pred[0][1], mean([bounds_pred[0][0], bounds_pred[0][1]]))
104
  z_value_pred = st.sidebar.slider('Move the slider to adjust the axial cut ', bounds_pred[2][0], bounds_pred[2][1], mean([bounds_pred[2][0], bounds_pred[2][1]]))
105
 
106
+ img_array = load_img(hf_hub_download(repo_id= "rootstrap-org/Alzheimer-Classifier-Demo", repo_type="dataset", subfolder="preprocessed", filename = img_path + ".nii.gz"))
107
  new_data = transforms(img_array)
108
  new_data_tensor = torch.from_numpy(np.array([new_data]))
109
 
 
145
  st.pyplot()
146
 
147
  else:
148
+ raw_image = nib.load(hf_hub_download(repo_id= "rootstrap-org/Alzheimer-Classifier-Demo", repo_type="dataset", subfolder="raw", filename = img_path + ".nii"))
149
 
150
  bounds_raw = plotting.find_cuts._get_auto_mask_bounds(raw_image)
151