Update app.py
Browse files
app.py
CHANGED
@@ -136,7 +136,13 @@ if uploaded_file is not None:
|
|
136 |
|
137 |
image = np.log10(data+1)
|
138 |
with colA:
|
|
|
139 |
plot_image(image, scale)
|
|
|
|
|
|
|
|
|
|
|
140 |
|
141 |
if detect:
|
142 |
data, wcs = cut(data, wcs, scale=scale)
|
@@ -149,14 +155,8 @@ if uploaded_file is not None:
|
|
149 |
pred = np.rot90(pred, -j)
|
150 |
y_pred += pred / 4
|
151 |
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
# Thresholding
|
156 |
-
y_pred = np.where(y_pred > threshold, y_pred, 0)
|
157 |
-
|
158 |
-
plot_prediction(y_pred)
|
159 |
-
|
160 |
# if decompose:
|
161 |
# cavs = decompose_cavity(y_pred, )
|
162 |
|
|
|
136 |
|
137 |
image = np.log10(data+1)
|
138 |
with colA:
|
139 |
+
st.markdown("""<style>[data-baseweb="select"] {margin-top: 6px;}</style>""", unsafe_allow_html=True)
|
140 |
plot_image(image, scale)
|
141 |
+
|
142 |
+
with colB:
|
143 |
+
threshold = st.slider("", 0.0, 1.0, 0.4, 0.05, label_visibility="hidden")
|
144 |
+
y_pred = np.zeros((128,128))
|
145 |
+
plot_prediction(y_pred)
|
146 |
|
147 |
if detect:
|
148 |
data, wcs = cut(data, wcs, scale=scale)
|
|
|
155 |
pred = np.rot90(pred, -j)
|
156 |
y_pred += pred / 4
|
157 |
|
158 |
+
y_pred = np.where(y_pred > threshold, y_pred, 0
|
159 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
160 |
# if decompose:
|
161 |
# cavs = decompose_cavity(y_pred, )
|
162 |
|