Shafeek Saleem commited on
Commit
682e7c7
·
1 Parent(s): b3ec987

bug fixed images - path

Browse files
pages/{3_Training teh Model.py → 3_Training the Model.py} RENAMED
@@ -61,19 +61,19 @@ def step3_page():
61
  img_dir = os.path.join(".sessions", get_login()["username"], "known_faces")
62
  images = os.listdir(img_dir)
63
  if len(images) > 0:
64
- st.subheader("First, let's see your saved faces in your known-face database.")
65
  cols = st.columns(len(images))
66
  for i, img in enumerate(images):
67
  face_name = img.split("_")[0]
68
  cols[i].image(os.path.join(img_dir, img), use_column_width=True)
69
  cols[i].write(face_name)
70
- st.subheader("Now it's your turn to train the model! Click on the button below to train the model with your data to generate face encodings!")
71
  if st.button("Train Model"):
72
  my_bar = st.progress(0, text="Training....")
73
  if len(images) > 0:
74
  database = get_database()
75
- for i in range(1000):
76
- my_bar.progress(i / 10, text="Training....")
77
  my_bar.progress(100, text="Successfully Trained!")
78
  st.success("Model trained successfully!")
79
  st.info("Now, lets generate face encodings for each face in known-face database using the model you just trained!")
 
61
  img_dir = os.path.join(".sessions", get_login()["username"], "known_faces")
62
  images = os.listdir(img_dir)
63
  if len(images) > 0:
64
+ st.info("First, let's see your saved faces in your known-face database.")
65
  cols = st.columns(len(images))
66
  for i, img in enumerate(images):
67
  face_name = img.split("_")[0]
68
  cols[i].image(os.path.join(img_dir, img), use_column_width=True)
69
  cols[i].write(face_name)
70
+ st.info("Now it's your turn to train the model! Click on the button below to train the model with your data to generate face encodings!")
71
  if st.button("Train Model"):
72
  my_bar = st.progress(0, text="Training....")
73
  if len(images) > 0:
74
  database = get_database()
75
+ for i in range(100):
76
+ my_bar.progress(i, text="Training....")
77
  my_bar.progress(100, text="Successfully Trained!")
78
  st.success("Model trained successfully!")
79
  st.info("Now, lets generate face encodings for each face in known-face database using the model you just trained!")