Update app.py
Browse files
app.py
CHANGED
@@ -95,10 +95,6 @@ if uploaded_file is not None:
|
|
95 |
|
96 |
with col3:
|
97 |
detect = st.button('Detect cavities')
|
98 |
-
|
99 |
-
with col4:
|
100 |
-
st.markdown("""<style>[data-baseweb="select"] {margin-top: 32px;}</style>""", unsafe_allow_html=True)
|
101 |
-
download = st.button('Download')
|
102 |
|
103 |
colA, colB = st.columns(2)
|
104 |
|
@@ -120,10 +116,14 @@ if uploaded_file is not None:
|
|
120 |
# Thresholding
|
121 |
y_pred = np.where(y_pred > 0.4, y_pred, 0)
|
122 |
|
123 |
-
plot_prediction(y_pred)
|
124 |
|
125 |
ccd = CCDData(y_pred, unit="adu", wcs=wcs)
|
126 |
ccd.write("predicted.fits", overwrite=True)
|
127 |
with open('predicted.fits', 'rb') as f:
|
128 |
data = f.read()
|
129 |
-
|
|
|
|
|
|
|
|
|
|
95 |
|
96 |
with col3:
|
97 |
detect = st.button('Detect cavities')
|
|
|
|
|
|
|
|
|
98 |
|
99 |
colA, colB = st.columns(2)
|
100 |
|
|
|
116 |
# Thresholding
|
117 |
y_pred = np.where(y_pred > 0.4, y_pred, 0)
|
118 |
|
119 |
+
# plot_prediction(y_pred)
|
120 |
|
121 |
ccd = CCDData(y_pred, unit="adu", wcs=wcs)
|
122 |
ccd.write("predicted.fits", overwrite=True)
|
123 |
with open('predicted.fits', 'rb') as f:
|
124 |
data = f.read()
|
125 |
+
|
126 |
+
with col4:
|
127 |
+
st.markdown("""<style>[data-baseweb="select"] {margin-top: 32px;}</style>""", unsafe_allow_html=True)
|
128 |
+
# download = st.button('Download')
|
129 |
+
download = st.download_button(label="Download", data=data, file_name="predicted.fits", mime="application/octet-stream")
|