Shafeek Saleem commited on
Commit
3767003
1 Parent(s): 5b853a4

bug fixed - image write

Browse files
Files changed (1) hide show
  1. app.py +1 -2
app.py CHANGED
@@ -44,8 +44,7 @@ if picture:
44
  if st.button("Save", key="button_"+str(i)):
45
  img_name = str(uuid.uuid4()) + f"{face_name}" + ".jpg"
46
  img_path = os.path.join(img_dir, img_name)
47
- with open(img_path, "wb") as f:
48
- f.write(face_image.getvalue())
49
  st.success("Face added successfully!")
50
  else:
51
  st.write("Please upload an image to proceed.")
 
44
  if st.button("Save", key="button_"+str(i)):
45
  img_name = str(uuid.uuid4()) + f"{face_name}" + ".jpg"
46
  img_path = os.path.join(img_dir, img_name)
47
+ im1 = pil_image.save(img_path)
 
48
  st.success("Face added successfully!")
49
  else:
50
  st.write("Please upload an image to proceed.")