switch_page : 🖱️ Switch page function - streamlit-extras
on using the switch_page(“faceauthentication”) present in widgets.py
i am getting this error: Could not find page faceauthentication. Must be one of [‘app’]
how do i resolve this?
code for ‘faceauthentication.py’:
import numpy as np
import streamlit as st
from .utils import register_new_usr
st.set_page_config(
page_name="faceauthentication",
)
def start():
arr = st.session_state.cur_usr
st.title("Welcome " + arr['name'])
# 0 for webcam feed ; add "path to file"
# for detection in video file
st.write("Add Face for Authentication")
#st.markdown('1. Press esc to exit \n 2. Press Space when face is ready to be captured')
result = False
#stuff`Preformatted text`
if result:
img_vector = np.array([-1])
register_new_usr(arr['name'],arr['email'],arr['username'],arr['password'],img_vector)
else:
st.error('User already exists in the DB indedtity theft is a crime', icon="🚨")
start()```