Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -18,7 +18,7 @@ def image_download_button(pil_image, filename: str, fmt: str, label="Download"):
|
|
18 |
|
19 |
pil_format = "JPEG" if fmt == "jpg" else "PNG"
|
20 |
file_format = "jpg" if fmt == "jpg" else "png"
|
21 |
-
mime = "image/jpeg" if fmt == "jpg" else "image/png"
|
22 |
|
23 |
buf = BytesIO()
|
24 |
|
@@ -65,7 +65,7 @@ if uploaded_file is not None:
|
|
65 |
st.image(img_output)
|
66 |
uploaded_name = os.path.splitext(uploaded_file.name)[0]
|
67 |
image_download_button(
|
68 |
-
pil_image=img_output
|
69 |
filename=uploaded_name,
|
70 |
fmt="png"
|
71 |
)
|
|
|
18 |
|
19 |
pil_format = "JPEG" if fmt == "jpg" else "PNG"
|
20 |
file_format = "jpg" if fmt == "jpg" else "png"
|
21 |
+
mime = "image/jpeg/?target=external" if fmt == "jpg" else "image/png/?target=external"
|
22 |
|
23 |
buf = BytesIO()
|
24 |
|
|
|
65 |
st.image(img_output)
|
66 |
uploaded_name = os.path.splitext(uploaded_file.name)[0]
|
67 |
image_download_button(
|
68 |
+
pil_image=img_output,
|
69 |
filename=uploaded_name,
|
70 |
fmt="png"
|
71 |
)
|