rishi9440 commited on
Commit
467691c
1 Parent(s): 713943e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
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 + "/?target=external",
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
  )