Spaces:
Sleeping
Sleeping
updated the course selection
Browse files- Exam_Maker.py +2 -2
- pages/2_Text_prompt.py +2 -6
Exam_Maker.py
CHANGED
@@ -22,7 +22,7 @@ if "authenticated" not in st.session_state:
|
|
22 |
def create_usertable():
|
23 |
conn = sqlite3.connect('users.db')
|
24 |
c = conn.cursor()
|
25 |
-
c.execute('CREATE TABLE IF NOT EXISTS userstable(username TEXT, password
|
26 |
c.execute('CREATE TABLE IF NOT EXISTS system_instructions(username TEXT PRIMARY KEY, instruction TEXT)')
|
27 |
c.execute('CREATE TABLE IF NOT EXISTS user_prompts(id INTEGER PRIMARY KEY AUTOINCREMENT, username TEXT, prompt_time TEXT, prompt_type TEXT)')
|
28 |
conn.commit()
|
@@ -132,7 +132,7 @@ def signup_page():
|
|
132 |
if existing_user:
|
133 |
st.error("Username already exists. Please choose a different username.")
|
134 |
else:
|
135 |
-
hashed_new_password = make_hashes(new_password)
|
136 |
add_userdata(new_user, hashed_new_password)
|
137 |
st.success("You have successfully created a valid Account")
|
138 |
st.info("Go to Login Menu to login")
|
|
|
22 |
def create_usertable():
|
23 |
conn = sqlite3.connect('users.db')
|
24 |
c = conn.cursor()
|
25 |
+
c.execute('CREATE TABLE IF NOT EXISTS userstable(username TEXT, password BLOB)')
|
26 |
c.execute('CREATE TABLE IF NOT EXISTS system_instructions(username TEXT PRIMARY KEY, instruction TEXT)')
|
27 |
c.execute('CREATE TABLE IF NOT EXISTS user_prompts(id INTEGER PRIMARY KEY AUTOINCREMENT, username TEXT, prompt_time TEXT, prompt_type TEXT)')
|
28 |
conn.commit()
|
|
|
132 |
if existing_user:
|
133 |
st.error("Username already exists. Please choose a different username.")
|
134 |
else:
|
135 |
+
hashed_new_password = make_hashes(new_password.encode("utf-8"))
|
136 |
add_userdata(new_user, hashed_new_password)
|
137 |
st.success("You have successfully created a valid Account")
|
138 |
st.info("Go to Login Menu to login")
|
pages/2_Text_prompt.py
CHANGED
@@ -487,12 +487,8 @@ def show_text_prompt():
|
|
487 |
|
488 |
# User inputs
|
489 |
# Course selection
|
490 |
-
course = st.
|
491 |
-
|
492 |
-
"Post Baccalaureate Diploma in Early Childhood Education",
|
493 |
-
"Master of Arts in Education - Language Teaching (English)",
|
494 |
-
"Master in Education major in Early Childhood Education"])
|
495 |
-
|
496 |
|
497 |
# Year level selection
|
498 |
year_level = st.selectbox("Select Year Level",
|
|
|
487 |
|
488 |
# User inputs
|
489 |
# Course selection
|
490 |
+
course = st.text_input("Enter Course",
|
491 |
+
"e.g.,Bachelor of Secondary Education")
|
|
|
|
|
|
|
|
|
492 |
|
493 |
# Year level selection
|
494 |
year_level = st.selectbox("Select Year Level",
|