RajaThor commited on
Commit
aad84d2
·
verified ·
1 Parent(s): 7094ced

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +25 -16
app.py CHANGED
@@ -7,7 +7,6 @@ from PIL import Image
7
  import numpy as np
8
  import cv2
9
  import dlib
10
- from streamlit_tour import st_tour
11
 
12
  # Get the current working directory
13
  current_directory = os.path.dirname(os.path.abspath(__file__))
@@ -281,20 +280,6 @@ def logout():
281
  st.session_state.auth_state["user"] = None
282
  st.session_state.auth_state["signed_in"] = False
283
 
284
- # Update the main function to include the new option
285
- def main():
286
- st.sidebar.title("Options")
287
- option = st.sidebar.radio("Select Option", ["Add Person", "Recognize Face", "Delete Person", "Recognize Face (Optimal)"])
288
-
289
- if option == "Add Person":
290
- add_person_ui()
291
- elif option == "Recognize Face":
292
- recognize_face_ui()
293
- elif option == "Delete Person":
294
- delete_person_ui()
295
- elif option == "Recognize Face (Optimal)":
296
- recognize_face_optimal_ui()
297
-
298
  # Define tour steps
299
  steps = [
300
  {
@@ -328,8 +313,32 @@ steps = [
328
  "content": "Click on these buttons to perform actions like adding a person or recognizing a face.",
329
  },
330
  ]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
331
 
332
  # Run the tour guide
333
  if __name__ == "__main__":
334
- st_tour(steps)
335
  authenticate_user_ui()
 
7
  import numpy as np
8
  import cv2
9
  import dlib
 
10
 
11
  # Get the current working directory
12
  current_directory = os.path.dirname(os.path.abspath(__file__))
 
280
  st.session_state.auth_state["user"] = None
281
  st.session_state.auth_state["signed_in"] = False
282
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
283
  # Define tour steps
284
  steps = [
285
  {
 
313
  "content": "Click on these buttons to perform actions like adding a person or recognizing a face.",
314
  },
315
  ]
316
+
317
+ # Function to display tour steps
318
+ def display_tour_steps(steps):
319
+ st.markdown("# Tour Guide")
320
+ st.markdown("This tour will guide you through the application.")
321
+ st.markdown("---")
322
+
323
+ for step in steps:
324
+ st.markdown(f"## {step['title']}")
325
+ st.write(step['content'])
326
+ st.markdown("---")
327
+
328
+ # Update the main function to include the new option
329
+ def main():
330
+ st.sidebar.title("Options")
331
+ option = st.sidebar.radio("Select Option", ["Add Person", "Recognize Face", "Delete Person", "Recognize Face (Optimal)"])
332
+ display_tour_steps(steps)
333
+ if option == "Add Person":
334
+ add_person_ui()
335
+ elif option == "Recognize Face":
336
+ recognize_face_ui()
337
+ elif option == "Delete Person":
338
+ delete_person_ui()
339
+ elif option == "Recognize Face (Optimal)":
340
+ recognize_face_optimal_ui()
341
 
342
  # Run the tour guide
343
  if __name__ == "__main__":
 
344
  authenticate_user_ui()