Plsek commited on
Commit
da7fe8b
·
1 Parent(s): f615c2b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +16 -16
app.py CHANGED
@@ -214,7 +214,7 @@ if uploaded_file is not None:
214
  threshold = st.slider("Threshold", 0.0, 1.0, 0.0, 0.05, key="threshold") #, label_visibility="hidden")
215
 
216
  # Decompose button
217
- with col5: decompose = st.button('Decompose', key="decompose")
218
 
219
  # Make two columns for plots
220
  _, colA, colB, colC, _ = st.columns([bordersize,1,1,1,bordersize])
@@ -230,23 +230,23 @@ if uploaded_file is not None:
230
 
231
  plot_prediction(y_pred_th)
232
 
233
- if decompose or st.session_state.get("download", False):
234
- image_decomposed = decompose_cavity(y_pred_th)
235
 
236
- plot_decomposed(image_decomposed)
237
 
238
- with col6:
239
- st.markdown("<br style='margin:4px 0'>", unsafe_allow_html=True)
240
- # st.markdown("""<style>[data-baseweb="select"] {margin-top: 16px;}</style>""", unsafe_allow_html=True)
241
- fname = uploaded_file.name.strip(".fits")
242
 
243
- # if st.session_state.get("download", False):
244
 
245
- shutil.make_archive("predictions", 'zip', "predictions")
246
- with open('predictions.zip', 'rb') as f:
247
- res = f.read()
248
 
249
- download = st.download_button(label="Download", data=res, key="download",
250
- file_name=f'{fname}_{int(scale*128)}.zip',
251
- # disabled=st.session_state.get("disabled", True),
252
- mime="application/octet-stream")
 
214
  threshold = st.slider("Threshold", 0.0, 1.0, 0.0, 0.05, key="threshold") #, label_visibility="hidden")
215
 
216
  # Decompose button
217
+ # with col5: decompose = st.button('Decompose', key="decompose")
218
 
219
  # Make two columns for plots
220
  _, colA, colB, colC, _ = st.columns([bordersize,1,1,1,bordersize])
 
230
 
231
  plot_prediction(y_pred_th)
232
 
233
+ # if decompose or st.session_state.get("download", False):
234
+ # image_decomposed = decompose_cavity(y_pred_th)
235
 
236
+ # plot_decomposed(image_decomposed)
237
 
238
+ # with col6:
239
+ # st.markdown("<br style='margin:4px 0'>", unsafe_allow_html=True)
240
+ # # st.markdown("""<style>[data-baseweb="select"] {margin-top: 16px;}</style>""", unsafe_allow_html=True)
241
+ # fname = uploaded_file.name.strip(".fits")
242
 
243
+ # # if st.session_state.get("download", False):
244
 
245
+ # shutil.make_archive("predictions", 'zip', "predictions")
246
+ # with open('predictions.zip', 'rb') as f:
247
+ # res = f.read()
248
 
249
+ # download = st.download_button(label="Download", data=res, key="download",
250
+ # file_name=f'{fname}_{int(scale*128)}.zip',
251
+ # # disabled=st.session_state.get("disabled", True),
252
+ # mime="application/octet-stream")