Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -73,7 +73,6 @@ uploaded_file = st.file_uploader("Choose an image...", type=["jpg", "jpeg", "png
|
|
73 |
|
74 |
if uploaded_file is not None:
|
75 |
image = np.array(Image.open(uploaded_file))
|
76 |
-
st.image(image, caption='Uploaded Image', use_column_width=True)
|
77 |
|
78 |
st.write("Converting...")
|
79 |
|
@@ -87,15 +86,13 @@ if uploaded_file is not None:
|
|
87 |
st.image(sketch, caption='Sketch', use_column_width=True)
|
88 |
|
89 |
# Provide a download link for the sketch image
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
mime="image/png"
|
98 |
-
)
|
99 |
else:
|
100 |
st.info("Please upload an image to convert.")
|
101 |
|
|
|
73 |
|
74 |
if uploaded_file is not None:
|
75 |
image = np.array(Image.open(uploaded_file))
|
|
|
76 |
|
77 |
st.write("Converting...")
|
78 |
|
|
|
86 |
st.image(sketch, caption='Sketch', use_column_width=True)
|
87 |
|
88 |
# Provide a download link for the sketch image
|
89 |
+
st.markdown("<br>", unsafe_allow_html=True) # Add some space before the button
|
90 |
+
btn = st.download_button(
|
91 |
+
label="Download Sketch",
|
92 |
+
data=Image.fromarray(sketch).tobytes(),
|
93 |
+
file_name="sketch.png",
|
94 |
+
mime="image/png"
|
95 |
+
)
|
|
|
|
|
96 |
else:
|
97 |
st.info("Please upload an image to convert.")
|
98 |
|