Update app.py
Browse files
app.py
CHANGED
|
@@ -80,7 +80,7 @@ if uploaded_file is not None:
|
|
| 80 |
# Add a slider to change the scale
|
| 81 |
with col1:
|
| 82 |
st.markdown(
|
| 83 |
-
"""<style>[data-baseweb="select"] {margin-top: -
|
| 84 |
unsafe_allow_html=True
|
| 85 |
)
|
| 86 |
|
|
@@ -110,12 +110,12 @@ if uploaded_file is not None:
|
|
| 110 |
|
| 111 |
plot_prediction(y_pred)
|
| 112 |
|
| 113 |
-
|
| 114 |
-
|
| 115 |
-
|
| 116 |
-
|
| 117 |
-
|
| 118 |
-
|
| 119 |
-
|
| 120 |
-
|
| 121 |
-
|
|
|
|
| 80 |
# Add a slider to change the scale
|
| 81 |
with col1:
|
| 82 |
st.markdown(
|
| 83 |
+
"""<style>[data-baseweb="select"] {margin-top: -52px;}</style>""",
|
| 84 |
unsafe_allow_html=True
|
| 85 |
)
|
| 86 |
|
|
|
|
| 110 |
|
| 111 |
plot_prediction(y_pred)
|
| 112 |
|
| 113 |
+
with col2:
|
| 114 |
+
download = st.button('Download')
|
| 115 |
+
|
| 116 |
+
if download:
|
| 117 |
+
ccd = CCDData(pred, unit="adu", wcs=wcs)
|
| 118 |
+
ccd.write("predicted.fits", overwrite=True)
|
| 119 |
+
with open('predicted.fits', 'rb') as f:
|
| 120 |
+
data = f.read()
|
| 121 |
+
st.download_button(label="Download", data=data, file_name="predicted.fits", mime="application/octet-stream")
|