moldenhof commited on
Commit
685777c
1 Parent(s): be4ef15

implementing app

Browse files
Files changed (2) hide show
  1. app.py +2 -0
  2. uploads/images/.gitkeep +0 -0
app.py CHANGED
@@ -45,6 +45,8 @@ if image_file is not None:
45
 
46
  image = Image.open(image_file)
47
  col1.image(image, use_column_width=True)
 
 
48
  with open(os.path.join("uploads/images/","0.png"),"wb") as f:
49
  f.write(image_file.getbuffer())
50
  st.success("Saved File")
 
45
 
46
  image = Image.open(image_file)
47
  col1.image(image, use_column_width=True)
48
+ if not os.path.exists("uploads/images"):
49
+ os.makedirs("uploads/images")
50
  with open(os.path.join("uploads/images/","0.png"),"wb") as f:
51
  f.write(image_file.getbuffer())
52
  st.success("Saved File")
uploads/images/.gitkeep DELETED
File without changes