Danila-Pechenev commited on
Commit
36a8e57
1 Parent(s): 6b89d2d

Make the app able to work with multiple users

Browse files
Files changed (1) hide show
  1. app/app.py +5 -2
app/app.py CHANGED
@@ -33,8 +33,11 @@ def process_image():
33
  image = call_model(uploaded_file)
34
  placeholder.empty()
35
  placeholder.image(image)
36
- with open("user_data/output.jpg", "rb") as file:
37
- st.download_button(label="Download lightened image", data=file, file_name="lightened.jpg", mime="image/jpg")
 
 
 
38
 
39
 
40
  def main():
 
33
  image = call_model(uploaded_file)
34
  placeholder.empty()
35
  placeholder.image(image)
36
+ image_bytes = io.BytesIO()
37
+ image.save(image_bytes, format="png")
38
+ st.download_button(
39
+ label="Download lightened image", data=image_bytes, file_name="lightened.png", mime="image/png"
40
+ )
41
 
42
 
43
  def main():