Spaces:
Sleeping
Sleeping
Update Image Augmentation.py
Browse files- Image Augmentation.py +11 -9
Image Augmentation.py
CHANGED
|
@@ -98,12 +98,14 @@ if uploaded_file:
|
|
| 98 |
|
| 99 |
st.image(cv2.cvtColor(transformed_image, cv2.COLOR_BGR2RGB), caption="Transformed Image", use_column_width=True)
|
| 100 |
|
| 101 |
-
|
| 102 |
-
|
| 103 |
-
|
| 104 |
-
|
| 105 |
-
|
| 106 |
-
|
| 107 |
-
|
| 108 |
-
|
| 109 |
-
|
|
|
|
|
|
|
|
|
| 98 |
|
| 99 |
st.image(cv2.cvtColor(transformed_image, cv2.COLOR_BGR2RGB), caption="Transformed Image", use_column_width=True)
|
| 100 |
|
| 101 |
+
# Provide download options after transformations
|
| 102 |
+
if transformed_image is not None:
|
| 103 |
+
st.markdown("### Download Transformed Image:")
|
| 104 |
+
download_format = st.radio("Select Download Format:", ["JPG", "PNG", "PDF"], key="download_format")
|
| 105 |
+
|
| 106 |
+
if download_format == "JPG":
|
| 107 |
+
st.markdown(download_image(transformed_image, download_format), unsafe_allow_html=True)
|
| 108 |
+
elif download_format == "PNG":
|
| 109 |
+
st.markdown(download_image(transformed_image, download_format), unsafe_allow_html=True)
|
| 110 |
+
elif download_format == "PDF":
|
| 111 |
+
st.markdown(download_pdf(transformed_image, download_format), unsafe_allow_html=True)
|