rbuell commited on
Commit
52ce651
1 Parent(s): 0ac695f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +46 -14
app.py CHANGED
@@ -12,22 +12,22 @@ openai.api_key = api_key
12
 
13
  def write_sidebar():
14
  st.sidebar.title("Instructions")
15
- st.sidebar.markdown("**Step 1: Select the student's grade level.**")
16
  st.sidebar.markdown("Choose the grade level of the student you want to analyze.")
17
  st.sidebar.markdown("---")
18
- st.sidebar.markdown("**Step 2: Select the student's qualifying condition(s).**")
19
  st.sidebar.markdown("Select one or more qualifying conditions that apply to the student.")
20
  st.sidebar.markdown("---")
21
- st.sidebar.markdown("**Step 3: Choose a category and prompt to analyze.**")
22
  st.sidebar.markdown("Select the category that corresponds to the area you want to analyze (e.g., Reading, Writing). Then choose a specific prompt related to that category.")
23
  st.sidebar.markdown("---")
24
- st.sidebar.markdown("**Step 4: Enter your student data.**")
25
  st.sidebar.markdown("Paste the relevant data about the student that you want to analyze. Provide information such as assessments, performance data, or observations.")
26
  st.sidebar.markdown("---")
27
- st.sidebar.markdown("**Step 5: Check the box to generate an IEP goal.**")
28
  st.sidebar.markdown("If you want the tool to generate an IEP goal based on the analysis, check this box.")
29
  st.sidebar.markdown("---")
30
- st.sidebar.markdown("**Step 6: Click the 'Generate' button to generate the selected output.**")
31
  st.sidebar.markdown("Once you have filled in the necessary information, click the 'Generate' button to generate the analysis or analysis with an IEP goal, depending on your selection.")
32
 
33
  st.sidebar.write("")
@@ -36,36 +36,68 @@ def write_sidebar():
36
  st.sidebar.write("Note: This app uses OpenAI's GPT-3 API to generate the analysis and IEP goal. Please enter data that is relevant and appropriate for generating the output.")
37
 
38
  def get_grade_specific_prompts(grade_level):
39
- # ...
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
40
 
41
  def write_iep_assist():
42
  st.title("IEP Assist Premium")
43
 
44
  # Select the student's grade level
45
- st.markdown("<h3>Step 1: Select the student's grade level:</h3>", unsafe_allow_html=True)
46
  grade_level = st.selectbox("Grade:", ["Pre-K", "K", "1st", "2nd", "3rd", "4th", "5th", "6th", "7th", "8th", "9th", "10th", "11th", "12th"], key="grade-level")
47
 
48
  # Select the student's qualifying condition
49
- st.markdown("<h3>Step 2: Select the student's qualifying condition(s):</h3>", unsafe_allow_html=True)
50
  qualifying_condition = st.multiselect("Qualifying Condition(s):", ["Specific Learning Disability", "Emotional Disturbance", "Autism", "Intellectual Disability", "Speech/Language Impairment", "Other Health Impairment", "Orthopedic Impairment", "Auditory Impairment", "Traumatic Brain Injury", "Deafness", "Blindness", "Developmental Delay"], key="qualifying-condition")
51
 
52
  grade_specific_prompts = get_grade_specific_prompts(grade_level)
53
 
54
  # Choose a category and prompt
55
- st.markdown("<h3>Step 3: Choose a category and prompt:</h3>", unsafe_allow_html=True)
56
  selected_category = st.selectbox("Category:", options=list(grade_specific_prompts.keys()), key="category")
57
  prompts = grade_specific_prompts[selected_category]
58
  selected_prompt = st.selectbox("Prompt:", options=prompts, key="prompt")
59
 
60
  # Enter student data to be analyzed
61
- st.markdown("<h3>Step 4: Enter student data to be analyzed:</h3>", unsafe_allow_html=True)
62
  student_data = st.text_area("Paste student data here", height=250, key="student-data")
63
 
64
  # Checkbox to generate IEP goal
65
- generate_goal = st.checkbox("Step 5: Generate IEP Goal", key="generate-goal")
66
 
67
  # Add a button to generate the analysis and IEP goal
68
- generate_button = st.button("Step 6: Generate", key="generate-button", help="Click here to generate the selected output.")
69
 
70
  if generate_button:
71
  if generate_goal:
@@ -99,4 +131,4 @@ def write_iep_assist():
99
 
100
  if __name__ == "__main__":
101
  write_sidebar()
102
- write_iep_assist()
 
12
 
13
  def write_sidebar():
14
  st.sidebar.title("Instructions")
15
+ st.sidebar.markdown("**1. Select the student's grade level.**")
16
  st.sidebar.markdown("Choose the grade level of the student you want to analyze.")
17
  st.sidebar.markdown("---")
18
+ st.sidebar.markdown("**2. Select the student's qualifying condition(s).**")
19
  st.sidebar.markdown("Select one or more qualifying conditions that apply to the student.")
20
  st.sidebar.markdown("---")
21
+ st.sidebar.markdown("**3. Choose a category and prompt to analyze.**")
22
  st.sidebar.markdown("Select the category that corresponds to the area you want to analyze (e.g., Reading, Writing). Then choose a specific prompt related to that category.")
23
  st.sidebar.markdown("---")
24
+ st.sidebar.markdown("**4. Enter your student data.**")
25
  st.sidebar.markdown("Paste the relevant data about the student that you want to analyze. Provide information such as assessments, performance data, or observations.")
26
  st.sidebar.markdown("---")
27
+ st.sidebar.markdown("**5. Check the box to generate an IEP goal.**")
28
  st.sidebar.markdown("If you want the tool to generate an IEP goal based on the analysis, check this box.")
29
  st.sidebar.markdown("---")
30
+ st.sidebar.markdown("**6. Click the 'Generate' button to generate the selected output.**")
31
  st.sidebar.markdown("Once you have filled in the necessary information, click the 'Generate' button to generate the analysis or analysis with an IEP goal, depending on your selection.")
32
 
33
  st.sidebar.write("")
 
36
  st.sidebar.write("Note: This app uses OpenAI's GPT-3 API to generate the analysis and IEP goal. Please enter data that is relevant and appropriate for generating the output.")
37
 
38
  def get_grade_specific_prompts(grade_level):
39
+ prompts = {
40
+ "Reading": [
41
+ "Analyze the reading data of a {grade} student to determine their current reading level and identify areas for growth. Provide insights into their reading fluency, comprehension, and decoding skills.",
42
+ "Based on the reading data of a {grade} student, summarize their reading strengths and weaknesses. Highlight specific areas that require support or intervention to enhance their overall reading abilities."
43
+ ],
44
+ "Writing": [
45
+ "Analyze the writing samples and assessments of a {grade} student to assess their current writing skills. Identify their strengths and areas for improvement in areas such as organization, grammar, sentence structure, and content development.",
46
+ "Based on the writing data of a {grade} student, evaluate their written expression. Summarize their writing strengths and areas that need development. Suggest strategies to enhance their overall writing abilities."
47
+ ],
48
+ "Math": [
49
+ "Analyze the math performance data of a {grade} student to assess their current math skills. Identify their strengths and areas for improvement in various mathematical concepts such as number sense, operations, geometry, and problem-solving.",
50
+ "Based on the math data of a {grade} student, evaluate their math abilities. Summarize their math strengths and areas that require additional support. Recommend strategies and interventions to foster their mathematical understanding and proficiency."
51
+ ],
52
+ "Functional": [
53
+ "Review the functional skills data of a {grade} student to assess their current level of independence in daily living tasks. Identify their strengths and areas that require support or intervention in areas such as self-care, communication, social skills, and functional academics.",
54
+ "Based on the functional skills data of a {grade} student, evaluate their abilities in daily living tasks. Summarize their functional strengths and areas for improvement. Provide recommendations to enhance their independence and functional skills development."
55
+ ],
56
+ "Speech": [
57
+ "Analyze the speech or language assessments of a {grade} student to assess their current communication abilities. Identify their speech or language strengths and areas for improvement in areas such as articulation, fluency, vocabulary, grammar, and pragmatic skills.",
58
+ "Based on the speech data of a {grade} student, evaluate their speech or language skills. Summarize their communication strengths and areas that require attention. Suggest interventions and strategies to support their speech or language development."
59
+ ],
60
+ "Behavior": [
61
+ "Review the behavior data of a {grade} student to assess their current behavior patterns and identify factors influencing their behavior. Summarize their behavior strengths and areas for improvement. Recommend behavior management strategies or interventions to address their specific needs.",
62
+ "Based on the behavior data of a {grade} student, evaluate their behavior patterns and trends. Summarize their behavior strengths and areas that require support. Provide guidance on effective behavior management techniques and interventions."
63
+ ],
64
+ "Other": [
65
+ "Analyze the data of a {grade} student in the specified area (e.g., social skills, executive functioning, sensory integration) to assess their current abilities. Identify their strengths and areas for growth. Provide insights and suggestions to support their development and success in the given domain.",
66
+ "Based on the data of a {grade} student in the specified area, evaluate their current abilities and areas that require attention. Summarize their strengths and areas for improvement. Recommend strategies, interventions, or accommodations to address their unique needs."
67
+ ]
68
+ }
69
+ grade = grade_level if grade_level != "Pre-K" else "Pre-Kindergarten"
70
+ grade_specific_prompts = {category: [prompt.format(grade=grade) for prompt in prompts[category]] for category in prompts}
71
+ return grade_specific_prompts
72
 
73
  def write_iep_assist():
74
  st.title("IEP Assist Premium")
75
 
76
  # Select the student's grade level
77
+ st.markdown("<h3>Select the student's grade level:</h3>", unsafe_allow_html=True)
78
  grade_level = st.selectbox("Grade:", ["Pre-K", "K", "1st", "2nd", "3rd", "4th", "5th", "6th", "7th", "8th", "9th", "10th", "11th", "12th"], key="grade-level")
79
 
80
  # Select the student's qualifying condition
81
+ st.markdown("<h3>Select the student's qualifying condition(s):</h3>", unsafe_allow_html=True)
82
  qualifying_condition = st.multiselect("Qualifying Condition(s):", ["Specific Learning Disability", "Emotional Disturbance", "Autism", "Intellectual Disability", "Speech/Language Impairment", "Other Health Impairment", "Orthopedic Impairment", "Auditory Impairment", "Traumatic Brain Injury", "Deafness", "Blindness", "Developmental Delay"], key="qualifying-condition")
83
 
84
  grade_specific_prompts = get_grade_specific_prompts(grade_level)
85
 
86
  # Choose a category and prompt
87
+ st.markdown("<h3>Choose a category and prompt:</h3>", unsafe_allow_html=True)
88
  selected_category = st.selectbox("Category:", options=list(grade_specific_prompts.keys()), key="category")
89
  prompts = grade_specific_prompts[selected_category]
90
  selected_prompt = st.selectbox("Prompt:", options=prompts, key="prompt")
91
 
92
  # Enter student data to be analyzed
93
+ st.markdown("<h3>Enter student data to be analyzed:</h3>", unsafe_allow_html=True)
94
  student_data = st.text_area("Paste student data here", height=250, key="student-data")
95
 
96
  # Checkbox to generate IEP goal
97
+ generate_goal = st.checkbox("Generate IEP Goal", key="generate-goal")
98
 
99
  # Add a button to generate the analysis and IEP goal
100
+ generate_button = st.button("Generate", key="generate-button", help="Click here to generate the selected output.")
101
 
102
  if generate_button:
103
  if generate_goal:
 
131
 
132
  if __name__ == "__main__":
133
  write_sidebar()
134
+ write_iep_assist()