Update app.py
Browse files
app.py
CHANGED
@@ -110,7 +110,7 @@ if uploaded_file is not None:
|
|
110 |
wcs = WCS(hdul[0].header)
|
111 |
|
112 |
# Make four columns for buttons
|
113 |
-
_, col1, col2, col3, col4, _ = st.columns([bordersize,0.
|
114 |
col1.subheader("Input image")
|
115 |
col3.subheader("Prediction")
|
116 |
|
@@ -121,11 +121,11 @@ if uploaded_file is not None:
|
|
121 |
scale = st.selectbox('Scale:',[f"{(i+1)*128}x{(i+1)*128}" for i in range(max_scale)], label_visibility="hidden")
|
122 |
scale = int(scale.split("x")[0]) // 128
|
123 |
|
124 |
-
with
|
125 |
st.markdown("""<style>[data-baseweb="select"] {margin-top: 16px;}</style>""", unsafe_allow_html=True)
|
126 |
detect = st.button('Detect cavities')
|
127 |
|
128 |
-
with
|
129 |
decompose = st.button('Docompose cavities')
|
130 |
|
131 |
# Make two columns for plots
|
@@ -146,7 +146,7 @@ if uploaded_file is not None:
|
|
146 |
y_pred += pred / 4
|
147 |
|
148 |
with colB:
|
149 |
-
threshold = st.slider("", 0, 1, 0.5, 0.05, label_visibility="hidden")
|
150 |
|
151 |
# Thresholding
|
152 |
y_pred = np.where(y_pred > threshold, y_pred, 0)
|
|
|
110 |
wcs = WCS(hdul[0].header)
|
111 |
|
112 |
# Make four columns for buttons
|
113 |
+
_, col1, col2, col3, col4, col5, col6, _ = st.columns([bordersize,0.5,0.5,0.5,0.5,0.5,0.5,bordersize])
|
114 |
col1.subheader("Input image")
|
115 |
col3.subheader("Prediction")
|
116 |
|
|
|
121 |
scale = st.selectbox('Scale:',[f"{(i+1)*128}x{(i+1)*128}" for i in range(max_scale)], label_visibility="hidden")
|
122 |
scale = int(scale.split("x")[0]) // 128
|
123 |
|
124 |
+
with col3:
|
125 |
st.markdown("""<style>[data-baseweb="select"] {margin-top: 16px;}</style>""", unsafe_allow_html=True)
|
126 |
detect = st.button('Detect cavities')
|
127 |
|
128 |
+
with col5:
|
129 |
decompose = st.button('Docompose cavities')
|
130 |
|
131 |
# Make two columns for plots
|
|
|
146 |
y_pred += pred / 4
|
147 |
|
148 |
with colB:
|
149 |
+
threshold = st.slider("", 0.0, 1.0, 0.5, 0.05, label_visibility="hidden")
|
150 |
|
151 |
# Thresholding
|
152 |
y_pred = np.where(y_pred > threshold, y_pred, 0)
|