Update app.py
Browse files
app.py
CHANGED
@@ -28,7 +28,7 @@ _, col, _ = st.columns([bordersize, 3, bordersize])
|
|
28 |
with col:
|
29 |
st.markdown("# Cavity Detection Tool")
|
30 |
|
31 |
-
st.markdown("Cavity Detection Tool (CADET) is a machine learning pipeline trained to detect X-ray cavities from noisy Chandra images of early-type galaxies
|
32 |
|
33 |
st.markdown("Input images should be centered at the centre of the galaxy and point sources should be filled with surrounding background ([dmfilth](https://cxc.cfa.harvard.edu/ciao/ahelp/dmfilth.html)).")
|
34 |
|
@@ -122,6 +122,7 @@ if uploaded_file is not None:
|
|
122 |
# scale = int(st.selectbox('Scale:',[i+1 for i in range(max_scale)], label_visibility="hidden"))
|
123 |
scale = st.selectbox('Scale:',[f"{(i+1)*128}x{(i+1)*128}" for i in range(max_scale)], label_visibility="hidden")
|
124 |
scale = int(scale.split("x")[0]) // 128
|
|
|
125 |
|
126 |
with col3:
|
127 |
# st.markdown("""<style>[data-baseweb="select"] {margin-top: 16px;}</style>""", unsafe_allow_html=True)
|
@@ -149,9 +150,8 @@ if uploaded_file is not None:
|
|
149 |
|
150 |
with colB:
|
151 |
st.markdown("""<style>[data-baseweb="select"] {margin-top: -36px;}</style>""", unsafe_allow_html=True)
|
152 |
-
threshold = st.slider("", 0.0, 1.0, 0.
|
153 |
-
|
154 |
-
y_pred = np.where(y_pred > threshold, y_pred, 0)
|
155 |
|
156 |
plot_prediction(y_pred)
|
157 |
|
|
|
28 |
with col:
|
29 |
st.markdown("# Cavity Detection Tool")
|
30 |
|
31 |
+
st.markdown("Cavity Detection Tool (CADET) is a machine learning pipeline trained to detect X-ray cavities from noisy Chandra images of early-type galaxies.\ To use this tool: upload your image, select the scale of interest, and make a prediction!\ If you use this tool for your research, please cite [Plšek et al. 2023](https://arxiv.org/abs/2304.05457)")
|
32 |
|
33 |
st.markdown("Input images should be centered at the centre of the galaxy and point sources should be filled with surrounding background ([dmfilth](https://cxc.cfa.harvard.edu/ciao/ahelp/dmfilth.html)).")
|
34 |
|
|
|
122 |
# scale = int(st.selectbox('Scale:',[i+1 for i in range(max_scale)], label_visibility="hidden"))
|
123 |
scale = st.selectbox('Scale:',[f"{(i+1)*128}x{(i+1)*128}" for i in range(max_scale)], label_visibility="hidden")
|
124 |
scale = int(scale.split("x")[0]) // 128
|
125 |
+
st.markdown("""<style>[data-baseweb="select"] {margin-top: 10px;}</style>""", unsafe_allow_html=True)
|
126 |
|
127 |
with col3:
|
128 |
# st.markdown("""<style>[data-baseweb="select"] {margin-top: 16px;}</style>""", unsafe_allow_html=True)
|
|
|
150 |
|
151 |
with colB:
|
152 |
st.markdown("""<style>[data-baseweb="select"] {margin-top: -36px;}</style>""", unsafe_allow_html=True)
|
153 |
+
threshold = st.slider("", 0.0, 1.0, 0.0, 0.05, label_visibility="hidden")
|
154 |
+
y_pred = np.where(y_pred > threshold, y_pred, 0)
|
|
|
155 |
|
156 |
plot_prediction(y_pred)
|
157 |
|