YUMAODAREN commited on
Commit
4c13722
·
verified ·
1 Parent(s): 1a33e94

Upload 3 files

Browse files
Files changed (3) hide show
  1. README.md +32 -12
  2. app.py +771 -0
  3. requirements.txt +171 -0
README.md CHANGED
@@ -1,12 +1,32 @@
1
- ---
2
- title: '1'
3
- emoji: 🐢
4
- colorFrom: blue
5
- colorTo: gray
6
- sdk: gradio
7
- sdk_version: 5.43.1
8
- app_file: app.py
9
- pinned: false
10
- ---
11
-
12
- Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # ECTEL_Course_Generation_APP
2
+ This is app for generating a scenario-based tutoring lesson based on the uploaded PDFs , expected themes .
3
+ Our code will be released after the paper is getting accepted.
4
+
5
+
6
+ ## Steps to Run the app
7
+
8
+ 1. First step creating virtual env
9
+
10
+ ```python
11
+ python3 -m venv myenv
12
+ ```
13
+
14
+ 2. Then activate it
15
+
16
+ ```bash
17
+ source myenv/bin/activate
18
+ ```
19
+
20
+ 3. Then after activating the virtual env install necessary libraries
21
+
22
+ ```python
23
+ pip install -r requirements.txt
24
+ ```
25
+
26
+ 4. Then run streamlit app
27
+
28
+ ```python
29
+ python -m streamlit run app.py
30
+ ```
31
+
32
+
app.py ADDED
@@ -0,0 +1,771 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ __import__('sqlite3')
2
+ import sys
3
+ sys.modules['sqlite3'] = sys.modules.pop('sqlite3')
4
+
5
+ import time
6
+ import uuid
7
+ import shutil
8
+ import os
9
+ import streamlit as st
10
+ import re
11
+ from langchain_openai import ChatOpenAI
12
+ from langchain_community.vectorstores import Chroma
13
+ from langchain_community.embeddings import OpenAIEmbeddings
14
+ from langchain.prompts import PromptTemplate
15
+ from langchain.chains import RetrievalQA
16
+ from langchain.schema import Document
17
+ from langchain.text_splitter import RecursiveCharacterTextSplitter
18
+ from PyPDF2 import PdfReader
19
+ import openai
20
+ from langchain_openai import ChatOpenAI
21
+ from streamlit_extras.switch_page_button import switch_page
22
+ from st_pages import Page, Section, show_pages, add_indentation
23
+
24
+ add_indentation()
25
+
26
+ show_pages([
27
+ Page("app.py", "Create a new lesson", "🏠"),
28
+ Section(name="Example Lessons", icon="🎈️"),
29
+ Page("pages/example.py", name="example1", icon=":star:"),
30
+ Page("pages/example2.py", name="example2", icon=":star:"),
31
+ Section(name="Result", icon="🎈️"),
32
+ Page("pages/step3.py", name="Page 1: Introduction"),
33
+ Page("pages/step3_result2.py", name="Page 2: scenario 1"),
34
+ Page("pages/step3_result3.py", name="Page 3: Scenario 2"),
35
+ Page("pages/step3_result4.py", name="Page 4: Research Says")
36
+ ])
37
+
38
+ if "visibility" not in st.session_state:
39
+ st.session_state.visibility = "visible"
40
+ st.session_state.disabled = False
41
+
42
+ template_1 = """
43
+ What tutoring strategy are the papers mainly talking about? Can you generate three components of a scenario-based tutor training course about how to use the tutoring strategy effectively in classrooms as discussed in the retrieved research paper?
44
+
45
+ I need your help to generate the course title, description, and learning objective, please follow the below template.
46
+
47
+ The course is about the topic the user input in online math tutoring session.
48
+
49
+ You should generate below 3 components, the title of the course, the course description, and the learning objectives, according to the requirements:
50
+
51
+ 1.Course Title: Generate a title of this tutor training course using three words, the title should begin with a verb. It should be related to the specific topic of the research paper and the course objective.
52
+ Example titles are: Managing inequity, Managing effective praise
53
+
54
+ 2.Description: A short description (50-60 words) about the purpose of this course and why it's important for the tutor. The structure could be similar to: Have you ever met a situation when you are in an online tutoring session, you find your students are [the background of the tutoring topic] and you want to change the situation? In this module, we will be introducing [strategy name] as a way of tutoring students in an online session more effectively.
55
+
56
+ 3. Learning Objectives (15-20 words for each):
57
+ Requirement for generation: You should generate 2 learning objectives. The learning objectives should address the "understanding" and the "creating" level of Bloom's taxonomy. Understanding means Constructing meaning from oral, written, and graphic messages through interpreting, exemplifying, classifying, summarizing, inferring, comparing, and explaining.
58
+
59
+ Creating means putting elements together to form a coherent or functional whole; reorganizing elements into a new pattern or structure through generating, planning, or producing.
60
+
61
+ Objective 1: Describe the expected outcome of this course.
62
+ Objective 2: Outline what learners will achieve by the end of this module regarding the second objective.
63
+
64
+ One of the objectives should clearly state the most effective strategy about how to apply this tutoring strategy in online tutoring session that is advocated in the retrieved research paper.
65
+
66
+ Please give the reason why you design the objective like this.
67
+
68
+ You don't need to create the specific scenario right now.
69
+ """
70
+
71
+ template_2 = """
72
+ Can you generate the scenario-based math tutor training course's first scenario about the below course title and learning objective based on the retrieved research paper? Please follow the below template to generate the first scenario for the training course based on the title and the learning objective.
73
+
74
+ Scenario-Based Online Tutor Training Course Development
75
+
76
+ Task: Generate the first scenario for an online tutor training course based on the provided course title and learning objective you generated in step 1, using the retrieved research paper. Follow the template below to structure the scenario.
77
+
78
+ Background information:
79
+
80
+ { Output from Template 1:
81
+ Course Title: ()
82
+ Description: ()
83
+ Learning Objectives:()
84
+ }
85
+
86
+ You don't need to show the above information again in your output.
87
+
88
+ You need to generate below components:
89
+
90
+ Template:
91
+ Scenario Structure:
92
+ Scenario 1: Describe an initial training scenario involving a common situation related to the course title and learning objectives when a teacher is tutoring online.
93
+ Scenario Context: Create a scenario involving a challenge related to the topic of the paper when the teacher is tutoring a student named [Student Name A]. The scenario should focus on the student's response that relates to the course topic. Use approximately 50 words.
94
+ Questions:
95
+ 1. Constructed-response Open-Ended Question (Motivation):
96
+ * Question: Ask participants to propose their response or solution to the scenario, directly addressing the mathematical topic-related issue in the scenario.
97
+ * Purpose: Initial reaction, free expression.
98
+ * Reason: Encourages creative thinking and reflection.
99
+ 2. Selected-response Question (Assessment of Understanding):
100
+ * Question: Present four possible tutor responses in conversation style about how to teach math effectively, and all responses should reflect the usage of the research recommendations with varied appropriateness, that could be applied in the scenario. Ask tutors to choose the most effective option which is most related to the research recommendation of the papers.
101
+ * Requirements:
102
+ * Make one option correct, aligning with the paper's suggestion.
103
+ * One option should be obviously wrong/unrelated.
104
+ * Two options should be close distractions but not aligned with the paper's recommendation.
105
+ * Ensure all options are similar in length (20-30 words each).
106
+ * Options:
107
+ * A. [Option A]
108
+ * B. [Option B]
109
+ * C. [Option C]
110
+ * D. [Option D]
111
+ * Mark the correct one and explain why the others are incorrect.
112
+ 3. Constructed-response Open-Ended Question (Justification):
113
+ * Question: Ask participants to explain why they chose the specific option in the previous question, detailing the reasoning behind their selection.
114
+ * Purpose: Encourage deep reasoning and reflection to reinforce the tutor's understanding and justification.
115
+ * Reason: Ensures participants can justify their choices and demonstrate a solid grasp of effective teaching strategies related to the scenario.
116
+ 4. Selected-response Question (Assessment of Understanding):
117
+ * Question: Present four possible tutor responses about how to teach this math topic effectively (statements, not conversations) that align with the responses in the previous questions, revealing the research-recommended strategy for the formative training scenario. Ask participants to select the principle that best supports their chosen response.
118
+ * Requirements:
119
+ * Provide statements reflecting various educational, ethical, or theoretical underpinnings related to the scenario.
120
+ * Highlight the correct answer.
121
+ * Options:
122
+ * A. [Option A]
123
+ * B. [Option B]
124
+ * C. [Option C]
125
+ * D. [Option D]
126
+ * Mark the correct answer and explain the reason for its selection and why the others are incorrect.
127
+ """
128
+
129
+ template_3 = """
130
+ Task: Generate the second scenario and the conclusion part for the online tutor training course based on the provided course title and learning objective you already generated, using the retrieved research paper.
131
+ Structure the scenario using the template below. It should be the same difficulty to answer as Scenario 1's questions.
132
+ The length will also be the same. Also, please generate the conclusion of this course based on the template given.
133
+
134
+ Background information (you don't need to generate this any more in your result):
135
+ {
136
+ { [Your generated Output from Template 1]:
137
+ Course Title: ()
138
+ Description:()
139
+ Learning Objectives:()
140
+
141
+ [Your generated Output from Template 2]
142
+ Scenario 1 is:
143
+ {Scenario 1's description}
144
+ }
145
+
146
+ You don't need to show the above information again in your output.
147
+ You need to generate below components:
148
+
149
+ Template:
150
+ Scenario Structure:
151
+ Scenario 2: Describe a transfer training scenario involving a common situation related to the course topic the user input when he/she is tutoring math online. This scenario should involve a new student [use a different student name than in Scenario 1] and is designed for tutors who have completed the initial scenario, but still focuses on the same topic.
152
+ Scenario Context: Create a scenario involving a challenge related to the topic of the paper when the teacher is tutoring a student named B [a different student name, compared to what you have in scenario 1]. The scenario should focus on the student's response that relates to the course topic. Use approximately 50 words.
153
+
154
+ Questions:
155
+ 1. Constructed-response Open-Ended Question (Motivation):
156
+ * Question: Ask participants to propose their response or solution to the scenario, directly addressing the topic-related issue in the scenario.
157
+ * Purpose: Initial reaction, free expression.
158
+ * Reason: Encourages creative thinking and reflection.
159
+ 2. Selected-response Question (Assessment of Understanding):
160
+ * Question: Present four possible tutor responses in conversation style about how to teach math effectively, and all responses should reflect the usage of the research recommendations with varied appropriateness, that could be applied in the scenario. Ask tutors to choose the most effective option which is most related to the research recommendation of the papers.
161
+ * Requirements:
162
+ * Make one option correct, aligning with the paper's suggestion.
163
+ * One option should be obviously wrong/unrelated.
164
+ * Two options should be close distractions but not aligned with the paper's recommendation.
165
+ * Ensure all options are similar in length (20-30 words each).
166
+ * Options:
167
+ * A. [Option A]
168
+ * B. [Option B]
169
+ * C. [Option C]
170
+ * D. [Option D]
171
+ * Mark the correct one and explain why the others are incorrect.
172
+ 3. Constructed-response Open-Ended Question (Justification):
173
+ * Question: Ask participants to explain why they chose the specific option in the previous question, detailing the reasoning behind their selection.
174
+ * Purpose: Encourage deep reasoning and reflection to reinforce the tutor's understanding and justification.
175
+ * Reason: Ensures participants can justify their choices and demonstrate a solid grasp of effective teaching strategies related to the scenario.
176
+ 4. Selected-response Question (Assessment of Understanding):
177
+ * Question: Present four possible tutor responses about how to teach this math topic effectively (statements, not conversations) that align with the responses in the previous questions, revealing the research-recommended strategy for the formative training scenario. Ask participants to select the principle that best supports their chosen response.
178
+ * Requirements:
179
+ * Provide statements reflecting various educational, ethical, or theoretical underpinnings related to the scenario.
180
+ * Highlight the correct answer.
181
+ * Options:
182
+ * A. [Option A]
183
+ * B. [Option B]
184
+ * C. [Option C]
185
+ * D. [Option D]
186
+ * Mark the correct answer and explain the reason for its selection and why the others are incorrect.
187
+
188
+ Conclusion Summary
189
+ Write a brief closing (40-50 words) summarizing the key takeaways from the course. Reinforce the importance of the tutoring strategy and its impact on student learning outcomes.
190
+ """
191
+
192
+ template_4 = """
193
+ Can you generate the scenario-based course's research insights part based on the retrieved research paper and your generated scenario based courses and the below template?
194
+ Please follow the template I give you.
195
+ Please don't say 'I don't know'.
196
+ If there is not enough information, make reasonable assumptions based on general research on online tutoring strategies.
197
+ Provide a detailed response following the structure below.
198
+
199
+ You are an AI research assistant. Your task is to analyze the provided research papers and extract information to fulfill the user's request. You MUST base your response solely and exclusively on the information contained in the retrieved research papers. You are NOT allowed to assume, infer, or generate any information that is not directly supported by the text.
200
+
201
+ If the required information is not present in the papers, you must state this clearly.
202
+ In that case, you may provide a short fallback explanation based on established educational principles,
203
+ but you must explicitly label it as "Not from the provided papers."
204
+
205
+ You should generate the following content:
206
+
207
+ Research Insights:
208
+
209
+ Summarize key research findings that support the learning objectives.
210
+ You should have at least 3 paragraphs to talk about these research findings, and add in-text citations.
211
+ Discuss practical applications of these insights.
212
+ An example could be as below, and you can use the same structure:
213
+
214
+ "Research says…
215
+ "
216
+
217
+ Strategy Table:
218
+ Generate a table with three rows and four columns based on the topic of [Learning Objective of the course] according to the research recommendations. Each row should include the following:
219
+
220
+ Strategy: [Specify the strategy about the topic].
221
+ Description: [Provide a brief description of the strategy and its effectiveness in communication.]
222
+ Good Example: [Give an example demonstrating how the strategy can be applied in a tutoring scenario, including the tone of a tutor. You should also list the reason why it is correct or not correct]
223
+ Bad Example: [Give an example demonstrating how the strategy can be applied in a tutoring scenario, including the tone of a tutor. You should provide one incorrect example here, to be opposite to a good example. You should also list the reason why it is correct or not correct]
224
+
225
+ References:
226
+ Cite all scholarly references and sources used in developing this course. You should list the source of the research papers you use here.
227
+ Do not list sources you didn't use.
228
+ """
229
+
230
+ template_1_1 = """
231
+ Do you know what tutoring strategy the paper is talking about? Can you generate a scenario-based tutor training course about how to use the tutoring strategy effectively in classrooms as discussed in the retrieved research paper?
232
+
233
+ I need your help to generate the course title, description and learning objective, please follow the below template.
234
+
235
+ Course Title: Generate a title of this tutor training course using three words, the title should begin with a verb. It should be related to the specific tutoring strategy of the research paper and the course objective.
236
+ Example titles are: Using polite language, Managing inequity, Managing effective praise
237
+
238
+ Description: A short description (50-60 words) about the purpose of this course and why it's important for the tutor. The structure could be similar to: Have you ever met a situation when you are in an online tutoring session, you find your students are [the background of the tutoring topic] and you want to change the situation? In this module, we will be introducing [strategy name] as a way of tutoring students in an online session more effectively.
239
+
240
+ Learning Objectives (15-20 words for each):
241
+ Requirement for generation: You should generate 2 learning objectives. The learning objectives should address the "understanding" and the "creating" level of Bloom's taxonomy.
242
+ Creating means use information to create something new, understanding means grasp meaning of instructional materials. You should generate two learning objectives.
243
+
244
+ Objective 1: Describe the expected outcome of this course.
245
+ Objective 2: Outline what learners will achieve by the end of this module regarding the second objective.
246
+
247
+ One of the objectives should clearly state the most effective strategy about how to apply this tutoring strategy in online tutoring session that is advocated in the retrieved research paper.
248
+
249
+ If the retrieved papers do not provide enough detail, create a default but relevant training course
250
+ drawing from general tutoring strategies (e.g., scaffolding, questioning, feedback).
251
+
252
+ Still follow the required structure.
253
+ """
254
+
255
+ template_1_2 = """
256
+ Scenario-Based Online Tutor Training Course Development
257
+
258
+ Task: Generate the first scenario for an online tutor training course based on the provided course title and learning objective, using the retrieved research paper. Follow the template below to structure the scenario.
259
+
260
+ When explaining the answers, explicitly state why the correct option is aligned with the research
261
+ and why each incorrect option is less effective or irrelevant.
262
+
263
+ You need to generate below components:
264
+
265
+ Template:
266
+ Scenario Structure:
267
+ Scenario 1: Describe an initial training scenario involving a common situation related to the course topic when a teacher is tutoring online.
268
+ Scenario Context: Create a scenario involving a challenge related to the topic of the paper when the teacher is tutoring a student named [Student Name]. The scenario should focus on the student's response that relates to the course topic. Use approximately 50 words.
269
+ Questions:
270
+ 1. Constructed-response Open-Ended Question (Motivation):
271
+ * Question: Ask participants to propose their response or solution to the scenario, directly addressing the tutoring-related issue in the scenario.
272
+ * Purpose: Initial reaction, free expression.
273
+ * Reason: Encourages creative thinking and reflection.
274
+ 2. Selected-response Question (Assessment of Understanding):
275
+ * Question: Present four possible tutor responses in conversation style about how to handle the situation effectively, with varied appropriateness, that could be applied in the scenario. Ask tutors to choose the most effective option.
276
+ * Requirements:
277
+ * Make one option correct, aligning with the paper's suggestion.
278
+ * One option should be obviously wrong/unrelated.
279
+ * Two options should be close distractions but not aligned with the paper's recommendation.
280
+ * Ensure all options are similar in length (20-30 words each).
281
+ * Options:
282
+ * A. [Option A]
283
+ * B. [Option B]
284
+ * C. [Option C]
285
+ * D. [Option D]
286
+ * Mark the correct one and explain why the others are incorrect.
287
+ 3. Constructed-response Open-Ended Question (Justification):
288
+ * Question: Ask participants to explain why they chose the specific option in the previous question, detailing the reasoning behind their selection.
289
+ * Purpose: Encourage deep reasoning and reflection to reinforce the tutor's understanding and justification.
290
+ * Reason: Ensures participants can justify their choices and demonstrate a solid grasp of effective teaching strategies related to the scenario.
291
+ 4. Selected-response Question (Assessment of Understanding):
292
+ * Question: Present four possible tutor responses about how to handle this situation effectively (statements, not conversations) that align with the responses in the previous questions, revealing the research-recommended strategy for the formative training scenario. Ask participants to select the principle that best supports their chosen response.
293
+ * Requirements:
294
+ * Provide statements reflecting various educational, ethical, or theoretical underpinnings related to the scenario.
295
+ * Highlight the correct answer.
296
+ * Options:
297
+ * A. [Option A]
298
+ * B. [Option B]
299
+ * C. [Option C]
300
+ * D. [Option D]
301
+ * Mark the correct answer and explain the reason for its selection.
302
+ """
303
+
304
+ template_1_3 = """
305
+ Task: Generate the second scenario for an online tutor training course based on the provided course title and learning objective, using the retrieved research paper.
306
+ Follow the template below to structure the scenario. It should be the same difficulty to answer as Scenario 1.
307
+ The length will also be the same.
308
+
309
+
310
+ When explaining the answers, explicitly state why the correct option is aligned with the research
311
+ and why each incorrect option is less effective or irrelevant.
312
+
313
+ Template:
314
+ Scenario Structure:
315
+ Scenario 2: Describe a transfer training scenario involving a common situation related to the course topic when a teacher is tutoring online. This scenario should involve a new student [use a different student name than in Scenario 1] and is designed for tutors who have completed the initial scenario, but still focuses on the same topic.
316
+ Scenario Context: Create a scenario involving a challenge related to the topic of the paper when the teacher is tutoring a student named [Student Name]. The scenario should focus on the student's response that relates to the course topic. Use approximately 50 words.
317
+
318
+ Questions:
319
+ 1. Constructed-response Open-Ended Question (Motivation):
320
+ * Question: Ask participants to propose their response or solution to the scenario, directly addressing the tutoring-related issue in the scenario.
321
+ * Purpose: Initial reaction, free expression.
322
+ * Reason: Encourages creative thinking and reflection.
323
+ 2. Selected-response Question (Assessment of Understanding):
324
+ * Question: Present four possible tutor responses in conversation style about how to handle the situation effectively, with varied appropriateness, that could be applied in the scenario. Ask tutors to choose the most effective option.
325
+ * Requirements:
326
+ * Make one option correct, aligning with the paper's suggestion.
327
+ * One option should be obviously wrong/unrelated.
328
+ * Two options should be close distractions but not aligned with the paper's recommendation.
329
+ * Ensure all options are similar in length (20-30 words each).
330
+ * Options:
331
+ * A. [Option A]
332
+ * B. [Option B]
333
+ * C. [Option C]
334
+ * D. [Option D]
335
+ * Mark the correct one and explain why the others are incorrect.
336
+ 3. Constructed-response Open-Ended Question (Justification):
337
+ * Question: Ask participants to explain why they chose the specific option in the previous question, detailing the reasoning behind their selection.
338
+ * Purpose: Encourage deep reasoning and reflection to reinforce the tutor's understanding and justification.
339
+ * Reason: Ensures participants can justify their choices and demonstrate a solid grasp of effective teaching strategies related to the scenario.
340
+ 4. Selected-response Question (Assessment of Understanding):
341
+ * Question: Present four possible tutor responses about how to handle this situation effectively (statements, not conversations) in the previous questions, revealing the research-recommended strategy for the formative training scenario. Ask participants to select the principle that best supports their chosen response.
342
+ * Requirements:
343
+ * Provide statements reflecting various educational, ethical, or theoretical underpinnings related to the scenario.
344
+ * Highlight the correct answer.
345
+ * Options:
346
+ * A. [Option A]
347
+ * B. [Option B]
348
+ * C. [Option C]
349
+ * D. [Option D]
350
+ * Mark the correct answer and explain the reason for its selection.
351
+ """
352
+
353
+ template_1_4 = """
354
+ You are an AI research assistant. Your task is to analyze the provided research papers and extract information to fulfill the user's request.
355
+
356
+ Can you generate the scenario-based course's research insights part based on the retrieved research paper and the below information? Please follow the template I give you.
357
+
358
+ You should generate the below content:
359
+
360
+ Research Insights:
361
+
362
+ Summarize key research findings that support the learning objectives.
363
+ You should have at least 3 paragraphs to talk about these research findings, and add in-text citations.
364
+ Discuss practical applications of these insights.
365
+ An example could be as below and you can use the same structure:
366
+
367
+ "Research says…
368
+ {context}
369
+ {summary}
370
+ "
371
+
372
+ Strategy Table:
373
+ Generate a table with three rows and four columns based on the topic of [Learning Objective of the course] according to the research recommendations. Each row should include the following:
374
+
375
+ Strategy: [Specify the strategy about the topic].
376
+ Description: [Provide a brief description of the strategy and its effectiveness in communication.]
377
+ Good Example: [Give an example demonstrating how the strategy can be applied in a tutoring scenario, including the tone of a tutor. You should also list the reason why it is correct or not correct]
378
+ Bad Example: [Give an example demonstrating how the strategy can be applied in a tutoring scenario, including the tone of a tutor. You should provide one incorrect example here, to be opposite to a good example. You should also list the reason why it is correct or not correct]
379
+
380
+ References:
381
+ Cite all scholarly references and sources used in developing this course. You should list the source of the research papers you use here.
382
+ Do not list sources you didn't use.
383
+
384
+ If fewer than three distinct findings are available in the retrieved papers,
385
+ supplement with well-established educational theories (clearly marked as not from the papers).
386
+
387
+ At least one strategy in the Strategy Table must be directly drawn from the retrieved paper content.
388
+ If citation details are incomplete, indicate this with "(Incomplete citation)".
389
+ """
390
+
391
+ classification_prompt = """
392
+ Please analyze the provided text from a research paper and classify its primary field of study.
393
+
394
+ Your response MUST be ONLY one of the following three labels:
395
+
396
+ 1. "EDUCATION_LEARNING_SCIENCE" - If the paper is primarily about teaching methods, learning theories, pedagogical strategies, educational technology, teacher training, or student outcomes in any subject.
397
+
398
+ 2. "LINGUISTICS_THEORY" - If the paper is primarily about the structure, history, or theory of a language itself (e.g., syntax, phonetics, semantics, sociolinguistics) WITHOUT a primary focus on pedagogy.
399
+
400
+ 3. "NON_EDUCATION" - If the paper is primarily about any other field, such as medicine, physics, pure mathematics, chemistry, biology, economics, etc., and is not fundamentally about teaching or learning.
401
+
402
+ Do not provide explanations. Only output the single most relevant label.
403
+ Paper Text: {paper_text_extract}
404
+ """
405
+
406
+
407
+ # # Add this function to classify PDF content
408
+ # def classify_pdf_content(text_chunks, openai_api_key):
409
+ # """
410
+ # Classify PDF content to determine if it's math-related or general education content
411
+ # """
412
+ # try:
413
+ # # Create a simple classification prompt
414
+ # classification_prompt = """
415
+ # Analyze the provided text from research papers and determine if the primary content is:
416
+ # 1. Mathematics education or math tutoring specific content
417
+ # 2. General education/tutoring content (not math-specific)
418
+ # 3. Other content (not education-related)
419
+ #
420
+ # Respond with only one of these three labels: "MATH", "GENERAL_EDUCATION", or "OTHER".
421
+ # """
422
+ #
423
+ # # Use a portion of the text for classification
424
+ # sample_text = ""
425
+ # for chunk in text_chunks[:5]: # Use first 5 chunks for classification
426
+ # sample_text += chunk.page_content[:500] + "\n\n" # Take first 500 chars from each chunk
427
+ #
428
+ # if len(sample_text) < 100: # Not enough text to classify
429
+ # return "GENERAL_EDUCATION" # Default to general education
430
+ #
431
+ # # Create embeddings and vector store for classification
432
+ # embeddings = OpenAIEmbeddings(openai_api_key=openai_api_key)
433
+ # vector_db = Chroma.from_documents(
434
+ # documents=[Document(page_content=sample_text)],
435
+ # embedding=embeddings
436
+ # )
437
+ #
438
+ # # Create retriever
439
+ # retriever = vector_db.as_retriever()
440
+ #
441
+ # # Create classification chain
442
+ # classification_template = """
443
+ # You are an AI assistant that classifies educational research papers.
444
+ # Based on the content below, classify whether the paper is primarily about:
445
+ # - Mathematics education (respond with "MATH")
446
+ # - General education/tutoring strategies (respond with "GENERAL_EDUCATION")
447
+ # - Other content not related to education (respond with "OTHER")
448
+ #
449
+ # Content: {context}
450
+ #
451
+ # Your response should be only one of these three labels: "MATH", "GENERAL_EDUCATION", or "OTHER".
452
+ # """
453
+ #
454
+ # PROMPT = PromptTemplate(
455
+ # template=classification_template,
456
+ # input_variables=["context"]
457
+ # )
458
+ #
459
+ # qa_chain = RetrievalQA.from_chain_type(
460
+ # llm=ChatOpenAI(
461
+ # openai_api_key=openai_api_key,
462
+ # model_name="gpt-3.5-turbo",
463
+ # temperature=0,
464
+ # ),
465
+ # chain_type="stuff",
466
+ # chain_type_kwargs={"prompt": PROMPT},
467
+ # retriever=retriever,
468
+ # )
469
+ #
470
+ # result = qa_chain.invoke({"query": classification_prompt})
471
+ # classification = result["result"].strip().upper()
472
+ #
473
+ # # Clean up
474
+ # vector_db.delete_collection()
475
+ #
476
+ # # Validate classification
477
+ # if classification in ["MATH", "GENERAL_EDUCATION", "OTHER"]:
478
+ # return classification
479
+ # else:
480
+ # return "GENERAL_EDUCATION" # Default to general education
481
+ #
482
+ # except Exception as e:
483
+ # st.error(f"Error classifying content: {str(e)}")
484
+ # return "GENERAL_EDUCATION" # Default to general education on error
485
+
486
+ def read_pdfs(pdf_files):
487
+
488
+ docs = []
489
+ for pdf_file in pdf_files:
490
+ reader = PdfReader(pdf_file)
491
+ text = ""
492
+ for page in reader.pages:
493
+ text += page.extract_text()
494
+ docs.append(Document(page_content=text))
495
+ return docs
496
+
497
+ def split_text(docs):
498
+
499
+ text_splitter = RecursiveCharacterTextSplitter(
500
+ chunk_size=2000, chunk_overlap=100, separators=["\n\n", "\n\n\n", "\n", " ", ""]
501
+ )
502
+ return text_splitter.split_documents(documents=docs)
503
+
504
+ def clear_all_cache():
505
+
506
+ cache_keys = [
507
+ # Keys from your original function
508
+ 'generated_course_1', 'generated_course_2',
509
+ 'generated_course_3', 'generated_course_4',
510
+ 'text', 'key', 'template1', 'template2',
511
+ 'template3', 'template4', 'is_math_template',
512
+
513
+ # --- Add these keys to fully reset the state ---
514
+ 'topic', 'learning_objective'
515
+ ]
516
+
517
+ for key in cache_keys:
518
+ if key in st.session_state:
519
+ del st.session_state[key]
520
+
521
+ st.cache_resource.clear()
522
+
523
+ for item in os.listdir("."):
524
+ if item.startswith("chroma_db"):
525
+ try:
526
+ shutil.rmtree(item, ignore_errors=True)
527
+ except Exception as e:
528
+ st.warning(f"Could not clear cache directory: {e}")
529
+
530
+ # In your main() function in app.py, you have a button for this:
531
+ if st.button("🔄 Clear Cache & Start Fresh", key="clear_cache_home"):
532
+ clear_all_cache()
533
+ st.success("Cache cleared! Please refresh the page to apply changes.")
534
+ st.rerun()
535
+ """clear all cache and reset the state of the app"""
536
+ cache_keys = [
537
+ 'generated_course_1', 'generated_course_2',
538
+ 'generated_course_3', 'generated_course_4',
539
+ 'text', 'key', 'template1', 'template2',
540
+ 'template3', 'template4', 'is_math_template'
541
+ ]
542
+
543
+ for key in cache_keys:
544
+ if key in st.session_state:
545
+ del st.session_state[key]
546
+
547
+ st.cache_resource.clear()
548
+
549
+ persist_directory = "chroma_db"
550
+ if os.path.exists(persist_directory):
551
+ try:
552
+ shutil.rmtree(persist_directory)
553
+ except Exception as e:
554
+ st.warning(f"Could not clear cache directory: {e}")
555
+
556
+ def generate_course_section_no_cache(openai_api_key, text_chunks, template):
557
+ """generate course section without using cache"""
558
+
559
+ persist_directory = f"chroma_db_{uuid.uuid4().hex[:8]}_{int(time.time())}"
560
+
561
+ try:
562
+ embeddings = OpenAIEmbeddings(openai_api_key=openai_api_key)
563
+ vector_db = Chroma.from_documents(
564
+ documents=text_chunks,
565
+ embedding=embeddings,
566
+ persist_directory=persist_directory
567
+ )
568
+
569
+ custom_retriever = vector_db.as_retriever()
570
+ custom_retriever.search_type = "mmr"
571
+ custom_retriever.search_kwargs = {"fetchK": 10, "lambda": 0.25}
572
+
573
+ prompt_template_text = """
574
+ You are an expert course generator tasked with creating a comprehensive tutor training course for online tutors. Use the retrieved information to answer the question and follow the template the user gives you, but you should not refer to the template context. Please generate a course based on the research paper. The users of the course are novice tutors who are experts in the subjects they are teaching but unfamiliar with the best method of teaching what they know to the students. The course should have a course title and some practical examples (each scenario should have 4 questions) and some practical research recommendation examples for the tutor to show how they could perform in their sessions.
575
+
576
+ For the contents you generated, please make sure the Flesch-Kincaid Score is below 10.
577
+
578
+ If you don't know the answer, please say "Sorry, I don't have enough context on this, please give me more instructions and I will try my best to help you!"
579
+ {context}
580
+ Question: {question}
581
+ """
582
+
583
+ PROMPT = PromptTemplate(template=prompt_template_text, input_variables=["context", "question"])
584
+
585
+ qachain = RetrievalQA.from_chain_type(
586
+ llm=ChatOpenAI(
587
+ openai_api_key=openai_api_key,
588
+ model_name="gpt-4o",
589
+ temperature=0.6,
590
+ verbose=False,
591
+ ),
592
+ chain_type="stuff",
593
+ chain_type_kwargs={"prompt": PROMPT},
594
+ retriever=custom_retriever,
595
+ )
596
+
597
+ doc_prompt = qachain.invoke({"query": template})
598
+ return doc_prompt["result"]
599
+
600
+ except Exception as e:
601
+ st.error(f"Error in generate_course_section_no_cache: {str(e)}")
602
+ return f"Error generating content: {str(e)}"
603
+
604
+ finally:
605
+
606
+ if os.path.exists(persist_directory):
607
+ try:
608
+ shutil.rmtree(persist_directory)
609
+ except Exception as e:
610
+ st.warning(f"Could not clean up temporary directory: {e}")
611
+
612
+ def main():
613
+ st.header("Create new lessons for online math tutors! ")
614
+ st.text("Input your customized course information")
615
+
616
+
617
+ if 'topic' not in st.session_state:
618
+ st.session_state.topic = None
619
+
620
+ if 'learning_objective' not in st.session_state:
621
+ st.session_state.learning_objective = ""
622
+
623
+ topics = ["Social Emotional Learning", "Mastery of Content", "Advocacy",
624
+ "Building Relationships", "Utilizing Technology Tools", "Other"]
625
+
626
+ current_index = None
627
+ if 'topic' in st.session_state and st.session_state.topic:
628
+ if st.session_state.topic in topics:
629
+ current_index = topics.index(st.session_state.topic)
630
+ else:
631
+ current_index = topics.index("Other")
632
+
633
+ selected_topic = st.selectbox(
634
+ "Select a topic",
635
+ topics,
636
+ index=current_index,
637
+ key="topic_selector"
638
+ )
639
+
640
+ st.session_state.topic = selected_topic
641
+
642
+ if st.session_state.topic == "Other":
643
+ custom_topic = st.text_input(
644
+ "Enter your custom topic:",
645
+ value="",
646
+ key="custom_topic_input"
647
+ )
648
+ if custom_topic.strip():
649
+ st.session_state.topic = custom_topic.strip()
650
+
651
+ if st.session_state.topic == "Mastery of Content":
652
+ st.session_state.is_math_template = True
653
+ st.info("📚 Math content templates will be used.")
654
+ elif st.session_state.topic and st.session_state.topic != "Other":
655
+ st.session_state.is_math_template = False
656
+ st.info("🎯 General tutoring templates will be used.")
657
+
658
+ example_text = """What's the lesson's learning objective? (optional)
659
+ (Example: 1. Identify features of tutors encouraging students' independence when engaging in tutoring
660
+ 2. Explain the importance of encouraging students' independence when working with students
661
+ 3. Apply strategies to encourage students' independence)"""
662
+
663
+ st.session_state.learning_objective = st.text_input(
664
+ example_text,
665
+ value=st.session_state.learning_objective,
666
+ key="learning_objective_input"
667
+ )
668
+
669
+ openai_api_key = st.text_input("OpenAI API Key", type="password", key="api_key_input")
670
+ uploaded_files = st.file_uploader(
671
+ "Upload PDF files (please enter less than five files)",
672
+ type=["pdf"],
673
+ accept_multiple_files=True,
674
+ key="file_uploader"
675
+ )
676
+
677
+ with st.expander("📋 Current Settings"):
678
+ st.write(f"**Topic:** {st.session_state.topic}")
679
+ st.write(f"**Learning Objective:** {st.session_state.learning_objective}")
680
+ st.write(f"**Template Type:** {'Math Content' if st.session_state.get('is_math_template', False) else 'General Tutoring'}")
681
+ st.write(f"**Files Uploaded:** {len(uploaded_files) if uploaded_files else 0}")
682
+
683
+ col1, col2 = st.columns([3.1, 1.5])
684
+
685
+ with col1:
686
+ if st.button("Visit pre-generated example lesson"):
687
+ switch_page("example2")
688
+
689
+ with col2:
690
+ # This button now simply validates input and moves to the next step.
691
+ if st.button("Next: Upload Files"):
692
+ if not st.session_state.topic or st.session_state.topic == "Other":
693
+ st.error("Please select or enter a valid topic")
694
+ elif not openai_api_key:
695
+ st.error("Please enter your OpenAI API Key")
696
+ elif not uploaded_files:
697
+ st.error("Please upload at least one PDF file")
698
+ else:
699
+ # All good, now process the files and save critical info to session_state
700
+ # before moving to the next page.
701
+ try:
702
+ # Save the key now
703
+ st.session_state.key = openai_api_key
704
+
705
+ # Process and save the text chunks
706
+ docs = read_pdfs(uploaded_files)
707
+ text_chunks = split_text(docs)
708
+ st.session_state.text = text_chunks
709
+
710
+ # Set the templates based on the topic
711
+ if st.session_state.get('is_math_template', False):
712
+ st.session_state.template1 = template_1
713
+ st.session_state.template2 = template_2
714
+ st.session_state.template3 = template_3
715
+ st.session_state.template4 = template_4
716
+ else:
717
+ st.session_state.template1 = template_1_1
718
+ st.session_state.template2 = template_1_2
719
+ st.session_state.template3 = template_1_3
720
+ st.session_state.template4 = template_1_4
721
+
722
+ st.success("Settings saved! Proceeding to generation...")
723
+ time.sleep(1) # Give user a moment to see the success message
724
+ switch_page("Page 1: Introduction") # Go directly to the generation page
725
+
726
+ except Exception as e:
727
+ st.error(f"Error processing files: {str(e)}")
728
+ if not openai_api_key:
729
+ st.error("Please enter your OpenAI API Key")
730
+ return
731
+
732
+ if not uploaded_files:
733
+ st.error("Please upload at least one PDF file")
734
+ return
735
+
736
+ if not st.session_state.topic or st.session_state.topic == "Other":
737
+ st.error("Please select or enter a valid topic")
738
+ return
739
+
740
+ clear_all_cache()
741
+
742
+ try:
743
+ docs = read_pdfs(uploaded_files)
744
+ text_chunks = split_text(docs)
745
+
746
+ # session state
747
+ st.session_state.key = openai_api_key
748
+ st.session_state.text = text_chunks
749
+
750
+ if st.session_state.get('is_math_template', False):
751
+ # math
752
+ st.session_state.template1 = template_1
753
+ st.session_state.template2 = template_2
754
+ st.session_state.template3 = template_3
755
+ st.session_state.template4 = template_4
756
+ else:
757
+ # general
758
+ st.session_state.template1 = template_1_1
759
+ st.session_state.template2 = template_1_2
760
+ st.session_state.template3 = template_1_3
761
+ st.session_state.template4 = template_1_4
762
+
763
+ st.success(f"✅ Settings saved! Generating course for topic: {st.session_state.topic}")
764
+ switch_page("Page 1: Introduction")
765
+
766
+ except Exception as e:
767
+ st.error(f"Error processing files: {str(e)}")
768
+ return
769
+
770
+ if __name__ == "__main__":
771
+ main()
requirements.txt ADDED
@@ -0,0 +1,171 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ pysqlite3-binary
2
+ aiohappyeyeballs==2.4.4
3
+ aiohttp==3.11.11
4
+ aiosignal==1.3.2
5
+ altair==5.5.0
6
+ annotated-types==0.7.0
7
+ anyio==4.7.0
8
+ asgiref==3.8.1
9
+ attrs==24.3.0
10
+ backoff==2.2.1
11
+ bcrypt==4.2.1
12
+ beautifulsoup4==4.12.3
13
+ blinker==1.9.0
14
+ build==1.2.2.post1
15
+ cachetools==5.5.0
16
+ certifi==2024.12.14
17
+ charset-normalizer==3.4.0
18
+ chroma-hnswlib==0.7.6
19
+ chromadb==0.5.23
20
+ click==8.1.7
21
+ coloredlogs==15.0.1
22
+ contourpy==1.3.1
23
+ cycler==0.12.1
24
+ dataclasses-json==0.6.7
25
+ Deprecated==1.2.15
26
+ distro==1.9.0
27
+ durationpy==0.9
28
+ entrypoints==0.4
29
+ Faker==33.1.0
30
+ fastapi==0.115.6
31
+ favicon==0.7.0
32
+ filelock==3.16.1
33
+ flatbuffers==24.3.25
34
+ fonttools==4.55.3
35
+ frozenlist==1.5.0
36
+ fsspec==2024.10.0
37
+ gitdb==4.0.11
38
+ GitPython==3.1.43
39
+ google-auth==2.37.0
40
+ googleapis-common-protos==1.66.0
41
+ grpcio==1.68.1
42
+ h11==0.14.0
43
+ htbuilder==0.7.0
44
+ httpcore==1.0.7
45
+ httptools==0.6.4
46
+ httpx==0.28.1
47
+ httpx-sse==0.4.0
48
+ huggingface-hub==0.27.0
49
+ humanfriendly==10.0
50
+ idna==3.10
51
+ importlib_metadata==8.5.0
52
+ importlib_resources==6.4.5
53
+ Jinja2==3.1.4
54
+ jiter==0.8.2
55
+ jsonpatch==1.33
56
+ jsonpointer==3.0.0
57
+ jsonschema==4.23.0
58
+ jsonschema-specifications==2024.10.1
59
+ kiwisolver==1.4.7
60
+ kubernetes==31.0.0
61
+ langchain==0.3.13
62
+ langchain-community==0.3.12
63
+ langchain-core==0.3.27
64
+ langchain-openai==0.2.13
65
+ langchain-text-splitters==0.3.4
66
+ langsmith==0.2.4
67
+ lxml==5.3.0
68
+ Markdown==3.7
69
+ markdown-it-py==3.0.0
70
+ markdownlit==0.0.7
71
+ MarkupSafe==3.0.2
72
+ marshmallow==3.23.2
73
+ matplotlib==3.10.0
74
+ mdurl==0.1.2
75
+ mmh3==5.0.1
76
+ monotonic==1.6
77
+ more-itertools==10.5.0
78
+ mpmath==1.3.0
79
+ multidict==6.1.0
80
+ mypy-extensions==1.0.0
81
+ narwhals==1.18.4
82
+ numpy==1.26.4
83
+ oauthlib==3.2.2
84
+ onnxruntime==1.20.1
85
+ openai==1.58.1
86
+ opentelemetry-api==1.29.0
87
+ opentelemetry-exporter-otlp-proto-common==1.29.0
88
+ opentelemetry-exporter-otlp-proto-grpc==1.29.0
89
+ opentelemetry-instrumentation==0.50b0
90
+ opentelemetry-instrumentation-asgi==0.50b0
91
+ opentelemetry-instrumentation-fastapi==0.50b0
92
+ opentelemetry-proto==1.29.0
93
+ opentelemetry-sdk==1.29.0
94
+ opentelemetry-semantic-conventions==0.50b0
95
+ opentelemetry-util-http==0.50b0
96
+ orjson==3.10.12
97
+ overrides==7.7.0
98
+ packaging==24.2
99
+ pandas==2.2.3
100
+ pillow==11.0.0
101
+ plotly==5.24.1
102
+ posthog==3.7.4
103
+ prometheus_client==0.21.1
104
+ propcache==0.2.1
105
+ protobuf==5.29.2
106
+ pyarrow==18.1.0
107
+ pyasn1==0.6.1
108
+ pyasn1_modules==0.4.1
109
+ pydantic==2.10.4
110
+ pydantic-settings==2.7.0
111
+ pydantic_core==2.27.2
112
+ pydeck==0.9.1
113
+ Pygments==2.18.0
114
+ pymdown-extensions==10.12
115
+ pyparsing==3.2.0
116
+ PyPDF2==3.0.1
117
+ PyPika==0.48.9
118
+ pyproject_hooks==1.2.0
119
+ python-dateutil==2.9.0.post0
120
+ python-dotenv==1.0.1
121
+ pytz==2024.2
122
+ PyYAML==6.0.2
123
+ referencing==0.35.1
124
+ regex==2024.11.6
125
+ requests==2.32.3
126
+ requests-oauthlib==2.0.0
127
+ requests-toolbelt==1.0.0
128
+ rich==13.9.4
129
+ rpds-py==0.22.3
130
+ rsa==4.9
131
+ shellingham==1.5.4
132
+ six==1.17.0
133
+ smmap==5.0.1
134
+ sniffio==1.3.1
135
+ soupsieve==2.6
136
+ SQLAlchemy==2.0.36
137
+ st-annotated-text==4.0.1
138
+ st-pages==0.4.1
139
+ st-theme==1.2.3
140
+ starlette==0.41.3
141
+ streamlit==1.41.1
142
+ streamlit-camera-input-live==0.2.0
143
+ streamlit-card==1.0.2
144
+ streamlit-embedcode==0.1.2
145
+ streamlit-extras==0.5.0
146
+ streamlit-faker==0.0.3
147
+ streamlit-image-coordinates==0.1.9
148
+ streamlit-keyup==0.2.4
149
+ streamlit-toggle-switch==1.0.2
150
+ streamlit-vertical-slider==2.5.5
151
+ sympy==1.13.3
152
+ tenacity==9.0.0
153
+ tiktoken==0.8.0
154
+ tokenizers==0.20.3
155
+ toml==0.10.2
156
+ tornado==6.4.2
157
+ tqdm==4.67.1
158
+ typer==0.15.1
159
+ typing-inspect==0.9.0
160
+ typing_extensions==4.12.2
161
+ tzdata==2024.2
162
+ urllib3==2.2.3
163
+ uvicorn==0.34.0
164
+ # uvloop==0.21.0
165
+ validators==0.34.0
166
+ watchfiles==1.0.3
167
+ websocket-client==1.8.0
168
+ websockets==14.1
169
+ wrapt==1.17.0
170
+ yarl==1.18.3
171
+ zipp==3.21.0