Shafeek Saleem commited on
Commit
3bc327b
·
1 Parent(s): d7a674d

bug fixed = same key error

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -40,8 +40,8 @@ if picture:
40
  face_image = image[top:bottom, left:right]
41
  pil_image = Image.fromarray(face_image)
42
  st.image(pil_image)
43
- face_name = st.text_input('Specify name', "This is a placeholder", key=str(i))
44
- if st.button("Save", key=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:
 
40
  face_image = image[top:bottom, left:right]
41
  pil_image = Image.fromarray(face_image)
42
  st.image(pil_image)
43
+ face_name = st.text_input('Specify name', "This is a placeholder", key="text_"+str(i))
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: