Plsek commited on
Commit
6141865
·
1 Parent(s): 72c54a3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -2
app.py CHANGED
@@ -148,11 +148,14 @@ def load_CADET():
148
  # model = load_model("CADET.hdf5")
149
  return model
150
 
 
 
 
 
151
 
152
  def reset_threshold():
153
  # del st.session_state["threshold"]
154
  st.session_state['threshold'] = 0.0
155
- st.session_state['example'] = False
156
 
157
  # Load model
158
  model = load_CADET()
@@ -189,7 +192,7 @@ If you use this tool in your research, please cite <a href='https://arxiv.org/ab
189
  _, col_1, col_2, _ = st.columns([bordersize, 2.5, 0.5, bordersize])
190
 
191
  with col_1:
192
- uploaded_file = st.file_uploader("Choose a FITS file", type=['fits'], on_change=reset_threshold)
193
 
194
  with col_2:
195
  st.markdown("<br style='margin:15px 0'>", unsafe_allow_html=True)
 
148
  # model = load_model("CADET.hdf5")
149
  return model
150
 
151
+ def reset_all():
152
+ # del st.session_state["threshold"]
153
+ st.session_state['threshold'] = 0.0
154
+ st.session_state['example'] = False
155
 
156
  def reset_threshold():
157
  # del st.session_state["threshold"]
158
  st.session_state['threshold'] = 0.0
 
159
 
160
  # Load model
161
  model = load_CADET()
 
192
  _, col_1, col_2, _ = st.columns([bordersize, 2.5, 0.5, bordersize])
193
 
194
  with col_1:
195
+ uploaded_file = st.file_uploader("Choose a FITS file", type=['fits'], on_change=reset_all)
196
 
197
  with col_2:
198
  st.markdown("<br style='margin:15px 0'>", unsafe_allow_html=True)