Shreeti Shrestha commited on
Commit
4fd3a9c
·
1 Parent(s): 674a813

everything works

Browse files
.streamlit/config.toml CHANGED
@@ -1,2 +1,2 @@
1
- # [client]
2
- # showSidebarNavigation = false
 
1
+ [client]
2
+ showSidebarNavigation = false
app.py CHANGED
@@ -3,6 +3,15 @@ from utils.firebase_util import init_connection
3
  init_connection()
4
 
5
  st.title("LSATLR Study")
 
 
 
 
 
 
 
 
 
6
  st.write("Welcome to our Study! Please enter your name and group ID to begin.")
7
 
8
  name =st.text_input("Name")
@@ -14,3 +23,4 @@ if start_btn:
14
  st.session_state.name = name
15
  st.session_state.group_id = group_id
16
  st.switch_page("pages/presurvey.py")
 
 
3
  init_connection()
4
 
5
  st.title("LSATLR Study")
6
+
7
+ st.write("""Welcome to our Study! The guidelines are as follows:
8
+ 1. We'll start with a short survey followed by a pre-quiz of LSAT Logical Reasoning questions
9
+ 2. Then you'll be assigned to a learning session based on your group (A or B)
10
+ 3. Use the "Click here when finished" to end session once you're done
11
+ 4. You'll then be directed to a post-quiz to review concepts learnt
12
+ 5. The study ends with a post survey to assess general experience
13
+ 6. You're expected to complete steps 1 - 5 in one sitting
14
+ """)
15
  st.write("Welcome to our Study! Please enter your name and group ID to begin.")
16
 
17
  name =st.text_input("Name")
 
23
  st.session_state.name = name
24
  st.session_state.group_id = group_id
25
  st.switch_page("pages/presurvey.py")
26
+
data/1744315247.8228698-gemini_messages DELETED
Binary file (9.14 kB)
 
data/1744315247.8228698-st_messages DELETED
Binary file (3.72 kB)
 
data/1744318794.032495-gemini_messages DELETED
Binary file (1.77 kB)
 
data/1744318794.032495-st_messages DELETED
Binary file (735 Bytes)
 
data/1744319656.5895352-gemini_messages DELETED
Binary file (3.04 kB)
 
data/1744319656.5895352-st_messages DELETED
Binary file (1.21 kB)
 
data/past_chats_list DELETED
Binary file (176 Bytes)
 
pages/llm_tutor.py CHANGED
@@ -6,6 +6,8 @@ from utils.questions_dataset import system_instruction, get_model_tools
6
  from google.genai import types
7
  from google import genai
8
 
 
 
9
  # GOOGLE_API_KEY=os.environ.get('GOOGLE_API_KEY')
10
  GEMINI_API_KEY = "AIzaSyAjpHA08BUwLhK-tIlORxcB18RAp3541-M"
11
  client = genai.Client(api_key=GEMINI_API_KEY)
@@ -16,7 +18,7 @@ AI_AVATAR_ICON = '✨'
16
 
17
  # Create a data/ folder if it doesn't already exist
18
  try:
19
- os.mkdir('data/groupb')
20
  except:
21
  # data/ folder already exists
22
  pass
@@ -51,7 +53,6 @@ with st.sidebar:
51
  st.session_state.chat_title = f'ChatSession-{st.session_state.chat_id}'
52
 
53
 
54
- st.set_page_config(page_title="LSAT Group A", page_icon="📘")
55
  st.title("📘Logical Reasoning: Group A")
56
  next_btn = st.button("Click here when finished")
57
 
@@ -137,7 +138,7 @@ if prompt := st.chat_input('Your message here...'):
137
  for chunk in response:
138
  # Simulate stream of chunk
139
  if chunk.text == None:
140
- full_response = "No response!! Report to admin!"
141
 
142
  for ch in chunk.text.split(' '):
143
  full_response += ch + ' '
 
6
  from google.genai import types
7
  from google import genai
8
 
9
+ st.set_page_config(page_title="LSAT Group A", page_icon="📘")
10
+
11
  # GOOGLE_API_KEY=os.environ.get('GOOGLE_API_KEY')
12
  GEMINI_API_KEY = "AIzaSyAjpHA08BUwLhK-tIlORxcB18RAp3541-M"
13
  client = genai.Client(api_key=GEMINI_API_KEY)
 
18
 
19
  # Create a data/ folder if it doesn't already exist
20
  try:
21
+ os.mkdir('data/')
22
  except:
23
  # data/ folder already exists
24
  pass
 
53
  st.session_state.chat_title = f'ChatSession-{st.session_state.chat_id}'
54
 
55
 
 
56
  st.title("📘Logical Reasoning: Group A")
57
  next_btn = st.button("Click here when finished")
58
 
 
138
  for chunk in response:
139
  # Simulate stream of chunk
140
  if chunk.text == None:
141
+ chunk.text = "Let's try that one more time so I understand. Please tell me one more time."
142
 
143
  for ch in chunk.text.split(' '):
144
  full_response += ch + ' '
pages/postsurvey.py CHANGED
@@ -1,6 +1,7 @@
1
  import streamlit as st
2
  from utils.firebase_util import push_postsurvey_data
3
 
 
4
  st.write("Please answer the following questions")
5
  q1 = st.radio("How was the difficulty of the second quiz compared to the first?",
6
  ["Easier", "Litttle Easier", "Similar", "Little Harder", "Harder"],
 
1
  import streamlit as st
2
  from utils.firebase_util import push_postsurvey_data
3
 
4
+ st.title("Post-Survey")
5
  st.write("Please answer the following questions")
6
  q1 = st.radio("How was the difficulty of the second quiz compared to the first?",
7
  ["Easier", "Litttle Easier", "Similar", "Little Harder", "Harder"],
pages/prequiz.py CHANGED
@@ -15,7 +15,7 @@ for index, row in prequiz_qs.iterrows():
15
  questions.append(st.radio(
16
  row['Question'],
17
  [row['A'], row['B'], row['C'], row['D'], row['E']],
18
- key=f'prequiz{row["qid"]}',
19
  ))
20
  st.divider()
21
 
 
15
  questions.append(st.radio(
16
  row['Question'],
17
  [row['A'], row['B'], row['C'], row['D'], row['E']],
18
+ key=f'prequiz{row["qid"]}'
19
  ))
20
  st.divider()
21
 
pages/presurvey.py CHANGED
@@ -1,6 +1,7 @@
1
  import streamlit as st
2
  from utils.firebase_util import push_presurvey_data
3
 
 
4
  st.write("Please take this short survey:")
5
  q1 = st.slider("On a scale of 1-5, how familiar are you with the LSAT Logical Reasoning section?\n" \
6
  "1: Never heard of it\n" \
 
1
  import streamlit as st
2
  from utils.firebase_util import push_presurvey_data
3
 
4
+ st.title("Pre-Survey")
5
  st.write("Please take this short survey:")
6
  q1 = st.slider("On a scale of 1-5, how familiar are you with the LSAT Logical Reasoning section?\n" \
7
  "1: Never heard of it\n" \
pages/textbook.py CHANGED
@@ -1,13 +1,10 @@
1
  import streamlit as st
2
  from utils.conceptexcerpts import concept_excerpts
3
  from utils.exampleexcerpts import example_excerpts
4
- from utils.misc import end_session, display_pre_quiz
5
 
6
  st.set_page_config(page_title="LSAT Group B", page_icon="📘")
7
  st.title("📘Logical Reasoning: Group B")
8
 
9
- display_pre_quiz()
10
-
11
  choices = ["A", "B", "C", "D", "E"]
12
 
13
  # Dropdown to select topic
@@ -29,7 +26,7 @@ if st.checkbox("Show Answer"):
29
  st.success(f"Correct Answer: {q[1]}")
30
 
31
 
32
- next_page = st.button("Click here to end session")
33
 
34
  if next_page:
35
  st.switch_page("pages/postquiz.py")
 
1
  import streamlit as st
2
  from utils.conceptexcerpts import concept_excerpts
3
  from utils.exampleexcerpts import example_excerpts
 
4
 
5
  st.set_page_config(page_title="LSAT Group B", page_icon="📘")
6
  st.title("📘Logical Reasoning: Group B")
7
 
 
 
8
  choices = ["A", "B", "C", "D", "E"]
9
 
10
  # Dropdown to select topic
 
26
  st.success(f"Correct Answer: {q[1]}")
27
 
28
 
29
+ next_page = st.button("Click here when finished")
30
 
31
  if next_page:
32
  st.switch_page("pages/postquiz.py")
utils/__pycache__/conceptexcerpts.cpython-311.pyc DELETED
Binary file (14.3 kB)
 
utils/__pycache__/exampleexcerpts.cpython-311.pyc DELETED
Binary file (19.1 kB)
 
utils/__pycache__/firebase_util.cpython-311.pyc DELETED
Binary file (3.17 kB)
 
utils/__pycache__/questions_dataset.cpython-311.pyc DELETED
Binary file (4.34 kB)
 
utils/questions_dataset.py CHANGED
@@ -68,4 +68,4 @@ system_instruction = """You are an AI tutor that teaches users LSAT Logical Reas
68
  Use practice questions from the tool to ensure they understand the material.
69
  If no practice questions are found in the tool for a certain subtopic, find general practice questions on that subtopic.
70
  Never give a one word answer. Always keep the conversation moving.
71
- Once the user has studied all the topics, prompt them to press the next button. """
 
68
  Use practice questions from the tool to ensure they understand the material.
69
  If no practice questions are found in the tool for a certain subtopic, find general practice questions on that subtopic.
70
  Never give a one word answer. Always keep the conversation moving.
71
+ Once the user has studied all the topics, prompt them to press the "Click here when finished" button. """