Update app.py
Browse files
app.py
CHANGED
|
@@ -180,43 +180,43 @@ with col:
|
|
| 180 |
# elif NGC5813:
|
| 181 |
# uploaded_file = "NGC5813_example.fits"
|
| 182 |
|
| 183 |
-
# If file is uploaded, read in the data and plot it
|
| 184 |
-
if uploaded_file is not None:
|
| 185 |
-
|
| 186 |
|
| 187 |
-
|
| 188 |
-
|
| 189 |
|
| 190 |
-
|
| 191 |
-
|
| 192 |
-
|
| 193 |
-
|
| 194 |
-
|
| 195 |
-
|
| 196 |
|
| 197 |
-
|
| 198 |
-
|
| 199 |
-
|
| 200 |
-
|
| 201 |
-
|
| 202 |
|
| 203 |
-
|
| 204 |
-
|
| 205 |
|
| 206 |
-
|
| 207 |
-
|
| 208 |
-
|
| 209 |
-
|
| 210 |
-
|
| 211 |
|
| 212 |
-
|
| 213 |
-
|
| 214 |
|
| 215 |
-
|
| 216 |
-
|
| 217 |
|
| 218 |
-
|
| 219 |
-
|
| 220 |
|
| 221 |
# if detect or threshold:
|
| 222 |
# # if st.session_state.get("detect", True):
|
|
|
|
| 180 |
# elif NGC5813:
|
| 181 |
# uploaded_file = "NGC5813_example.fits"
|
| 182 |
|
| 183 |
+
# # If file is uploaded, read in the data and plot it
|
| 184 |
+
# if uploaded_file is not None:
|
| 185 |
+
# data, wcs = load_file(uploaded_file)
|
| 186 |
|
| 187 |
+
# # if "data" not in locals():
|
| 188 |
+
# # data = np.zeros((128,128))
|
| 189 |
|
| 190 |
+
# # Make six columns for buttons
|
| 191 |
+
# _, col1, col2, col3, col4, col5, col6, _ = st.columns([bordersize,0.5,0.5,0.5,0.5,0.5,0.5,bordersize])
|
| 192 |
+
# col1.subheader("Input image")
|
| 193 |
+
# col3.subheader("Prediction")
|
| 194 |
+
# col5.subheader("Decomposed")
|
| 195 |
+
# col6.subheader("")
|
| 196 |
|
| 197 |
+
# with col1:
|
| 198 |
+
# st.markdown("""<style>[data-baseweb="select"] {margin-top: -46px;}</style>""", unsafe_allow_html=True)
|
| 199 |
+
# max_scale = int(data.shape[0] // 128)
|
| 200 |
+
# scale = st.selectbox('Scale:',[f"{(i+1)*128}x{(i+1)*128}" for i in range(max_scale)], label_visibility="hidden", on_change=change_scale)
|
| 201 |
+
# scale = int(scale.split("x")[0]) // 128
|
| 202 |
|
| 203 |
+
# # Detect button
|
| 204 |
+
# with col3: detect = st.button('Detect', key="detect")
|
| 205 |
|
| 206 |
+
# # Threshold slider
|
| 207 |
+
# with col4:
|
| 208 |
+
# st.markdown("")
|
| 209 |
+
# # st.markdown("""<style>[data-baseweb="select"] {margin-top: -36px;}</style>""", unsafe_allow_html=True)
|
| 210 |
+
# threshold = st.slider("Threshold", 0.0, 1.0, 0.0, 0.05, key="threshold") #, label_visibility="hidden")
|
| 211 |
|
| 212 |
+
# # Decompose button
|
| 213 |
+
# with col5: decompose = st.button('Decompose', key="decompose")
|
| 214 |
|
| 215 |
+
# # Make two columns for plots
|
| 216 |
+
# _, colA, colB, colC, _ = st.columns([bordersize,1,1,1,bordersize])
|
| 217 |
|
| 218 |
+
# image = np.log10(data+1)
|
| 219 |
+
# plot_image(image, scale)
|
| 220 |
|
| 221 |
# if detect or threshold:
|
| 222 |
# # if st.session_state.get("detect", True):
|