Update app.py
Browse files
app.py
CHANGED
|
@@ -85,7 +85,12 @@ if uploaded_file is not None:
|
|
| 85 |
pred = np.rot90(pred, -j)
|
| 86 |
y_pred += pred / 4
|
| 87 |
|
| 88 |
-
|
| 89 |
-
|
| 90 |
|
| 91 |
plot_prediction(image_data, y_pred)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 85 |
pred = np.rot90(pred, -j)
|
| 86 |
y_pred += pred / 4
|
| 87 |
|
| 88 |
+
ccd = CCDData(pred, unit="adu", wcs=wcs)
|
| 89 |
+
ccd.write(f"predicted.fits", overwrite=True)
|
| 90 |
|
| 91 |
plot_prediction(image_data, y_pred)
|
| 92 |
+
|
| 93 |
+
if st.button('Download FITS File'):
|
| 94 |
+
with open('predicted.fits', 'rb') as f:
|
| 95 |
+
data = f.read()
|
| 96 |
+
st.download_button(label="Download", data=data, file_name="predicted.fits", mime="application/octet-stream")
|