dhanvanth183 commited on
Commit
75e0119
·
verified ·
1 Parent(s): 98c46a1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +26 -10
app.py CHANGED
@@ -95,12 +95,12 @@ st.markdown("""
95
 
96
  # Initialize generator
97
  #@st.cache_resource
98
- def get_generator():
99
- return LessonPlanGenerator()
100
 
101
 
102
- #generator = LessonPlanGenerator()
103
- generator = get_generator()
104
  # Header
105
  st.title("WizLab Lesson Plan Generator")
106
  st.markdown("We help you generate lesson plans tailored to your needs.")
@@ -150,6 +150,17 @@ with col1:
150
  # Use mapping if available, otherwise use the base language name
151
  language = LANGUAGE_MAPPING.get(language_selection, language_selection)
152
 
 
 
 
 
 
 
 
 
 
 
 
153
  #if language_selection == "Other":
154
  # language = st.text_input("Specify Language")
155
  # else:
@@ -164,16 +175,19 @@ with col2:
164
  #else:
165
  # duration = duration_selection
166
  duration = st.text_input("Duration [in minutes]", placeholder = "e.g., 25 minutes")
167
- proficiency_options = ["Beginner [A1]", "Elementary [A2]", "Intermediate[B1, B2]", "Advanced[C1]", "Proficient [C2]", "Other"]
168
  proficiency_selection = st.selectbox("Proficiency Level [CEFR]", proficiency_options)
169
  if proficiency_selection == "Other":
170
  proficiency = st.text_input("Specify Proficiency Level")
171
  else:
172
  proficiency = proficiency_selection
173
 
174
- tech_options = ["Interactive Whiteboard", "Computers/Laptops",
175
- "Mobile Devices", "Internet Access", "None", "Other"]
176
- tech_selection = st.multiselect("Accessible Tech Resources", tech_options)
 
 
 
177
 
178
  if "Other" in tech_selection:
179
  other_tech = st.text_input("Specify Other Technology Requirements")
@@ -259,8 +273,10 @@ if st.button("Generate Lesson Plan", type="primary"):
259
  language = "English"
260
 
261
  detailed_prompt = f"""
262
- Create a lesson plan for teaching '{topic}' to {age_group} students.
263
- Duration: {duration} minutes,
 
 
264
  Proficiency Level [CEFR]: {proficiency},
265
  Technology Requirements: {', '.join(tech_usage) if tech_usage else 'None'},
266
  Generate response in {language} Language.
 
95
 
96
  # Initialize generator
97
  #@st.cache_resource
98
+ #def get_generator():
99
+ #return LessonPlanGenerator()
100
 
101
 
102
+ generator = LessonPlanGenerator()
103
+
104
  # Header
105
  st.title("WizLab Lesson Plan Generator")
106
  st.markdown("We help you generate lesson plans tailored to your needs.")
 
150
  # Use mapping if available, otherwise use the base language name
151
  language = LANGUAGE_MAPPING.get(language_selection, language_selection)
152
 
153
+ skills_section = ["Reading", "Writing", "Listening", "Speaking", "Other"]
154
+
155
+ skill_focus = st.multiselect("Skills to focus", skills_section)
156
+
157
+ if "Other" in skill_focus:
158
+ other_skills = st.text_input("Specify Skills to focus")
159
+ skill_focus.remove("Other") # Remove 'Other' placeholder from the list
160
+ if other_skills:
161
+ skill_focus.append(other_skills) # Add user-specified skills
162
+
163
+ #st.write("Selected Skills:", skill_focus)
164
  #if language_selection == "Other":
165
  # language = st.text_input("Specify Language")
166
  # else:
 
175
  #else:
176
  # duration = duration_selection
177
  duration = st.text_input("Duration [in minutes]", placeholder = "e.g., 25 minutes")
178
+ proficiency_options = ["Beginner [A1]", "Elementary [A2]", "Intermediate[B1]", "Upper-Intermediate [B2]", "Advanced[C1]", "Proficient [C2]", "Other"]
179
  proficiency_selection = st.selectbox("Proficiency Level [CEFR]", proficiency_options)
180
  if proficiency_selection == "Other":
181
  proficiency = st.text_input("Specify Proficiency Level")
182
  else:
183
  proficiency = proficiency_selection
184
 
185
+ tech_options = ["Interactive Whiteboard", "Computers/Laptops",
186
+ "Mobile Devices", "Internet Access", "None", "Other"]
187
+ tech_selection = st.multiselect("Accessible Tech Resources", tech_options)
188
+
189
+ num_students = st.text_input("Number of students", placeholder= "e.g., 30 students")
190
+
191
 
192
  if "Other" in tech_selection:
193
  other_tech = st.text_input("Specify Other Technology Requirements")
 
273
  language = "English"
274
 
275
  detailed_prompt = f"""
276
+ Create a lesson plan for teaching '{topic}' to {age_group} students, for a
277
+ Duration: {duration} minutes,
278
+ Number of students in the class: {num_students},
279
+ SKills to focus in generating lesson plan: {skill_focus}
280
  Proficiency Level [CEFR]: {proficiency},
281
  Technology Requirements: {', '.join(tech_usage) if tech_usage else 'None'},
282
  Generate response in {language} Language.