Spaces:
Runtime error
Runtime error
Errolmking
commited on
Commit
·
7f78bf1
1
Parent(s):
487666f
Major update
Browse filesAdded two new tools.
Updated interface to be tabbed.
app.py
CHANGED
@@ -154,7 +154,7 @@ class UnitGenerator:
|
|
154 |
except Empty:
|
155 |
continue
|
156 |
|
157 |
-
|
158 |
Take the following class overview (delimited by three dollar signs)
|
159 |
$$$
|
160 |
{input}
|
@@ -168,19 +168,114 @@ agent_prompt = """
|
|
168 |
Make a list of 7 critical skills describing what we want students to be able to do. Each item should begin with "Students will be able to..."
|
169 |
Make a list of 7 example assessments we can use to give students opportunities to demonstrate their skills. Explain the assessment idea and which key concepts and skills they map to.
|
170 |
Make a list of 7 creative ways that I might adapt the experience for different learning styles. Explain the way I might adapt the experience to the learning style.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
171 |
"""
|
172 |
|
173 |
-
|
174 |
|
175 |
def generate_unit(input):
|
176 |
for next_token, content in unit_generator.stream(input):
|
177 |
yield(content)
|
178 |
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
154 |
except Empty:
|
155 |
continue
|
156 |
|
157 |
+
unit_generator_prompt = """
|
158 |
Take the following class overview (delimited by three dollar signs)
|
159 |
$$$
|
160 |
{input}
|
|
|
168 |
Make a list of 7 critical skills describing what we want students to be able to do. Each item should begin with "Students will be able to..."
|
169 |
Make a list of 7 example assessments we can use to give students opportunities to demonstrate their skills. Explain the assessment idea and which key concepts and skills they map to.
|
170 |
Make a list of 7 creative ways that I might adapt the experience for different learning styles. Explain the way I might adapt the experience to the learning style.
|
171 |
+
Make a list of 7 opportunity that this unit can support the learners development towards the "portrait" of a graduate. Each opportunity should identify the trait and how it might be applied.
|
172 |
+
"""
|
173 |
+
|
174 |
+
unit_generator = SingleInputAgent(prompt_template=unit_generator_prompt)
|
175 |
+
|
176 |
+
lesson_idea_generator_prompt = """
|
177 |
+
Below is a curriculum unit expressed using the understanding by design methodology ( delimited by the triple dollar signs).
|
178 |
+
$$$
|
179 |
+
{input}
|
180 |
+
$$$
|
181 |
+
Use this unit definition to generate a list of 10 learning activity ideas inspired by different pedagogies. ( play-based, project-based, game-based, etc.)
|
182 |
+
Each idea should include a title, a one sentence description of the activity, a one sentence description of how it addresses key concepts from the unit.
|
183 |
+
"""
|
184 |
+
|
185 |
+
lesson_idea_generator = SingleInputAgent(prompt_template=lesson_idea_generator_prompt)
|
186 |
+
|
187 |
+
lesson_builder_prompt = """
|
188 |
+
Below is a unit expressed using the understanding by design methodology along with a description of a lesson idea ( delimited by the triple dollar signs).
|
189 |
+
$$$
|
190 |
+
{input}
|
191 |
+
$$$
|
192 |
+
Build a detailed lesson plan from the lesson idea that addresses the unit topics.
|
193 |
+
Make references to the unit through out the lesson plan.
|
194 |
+
Include ideas of differentiation and supporting different learners.
|
195 |
+
Explain how this lesson supports the unit.
|
196 |
"""
|
197 |
|
198 |
+
lesson_builder = SingleInputAgent(prompt_template=lesson_builder_prompt)
|
199 |
|
200 |
def generate_unit(input):
|
201 |
for next_token, content in unit_generator.stream(input):
|
202 |
yield(content)
|
203 |
|
204 |
+
def generate_lesson_ideas(unit):
|
205 |
+
for next_token, content in lesson_idea_generator.stream(unit):
|
206 |
+
yield(content)
|
207 |
+
|
208 |
+
def generate_lesson_plan(unit,lesson_description):
|
209 |
+
input = unit + "Lesson description below (delimited by triple ampersand): @@@ " + lesson_description + " @@@"
|
210 |
+
for next_token, content in lesson_builder.stream(input):
|
211 |
+
yield(content)
|
212 |
+
|
213 |
+
app = gr.Blocks(theme=gr.themes.Soft())
|
214 |
+
|
215 |
+
with app:
|
216 |
+
|
217 |
+
gr.Markdown(
|
218 |
+
"""
|
219 |
+
# Curriculum Co-Creator
|
220 |
+
|
221 |
+
A suite of tools for designing and building course units and lessons.
|
222 |
+
|
223 |
+
questions?
|
224 |
+
email: errol.m.king@gmail.com
|
225 |
+
|
226 |
+
""")
|
227 |
+
|
228 |
+
with gr.Tab("Vision --> Unit"):
|
229 |
+
gr.Markdown(
|
230 |
+
"""
|
231 |
+
|
232 |
+
The Vision to Unit tool will take an idea of a learning experience and build out a UBD unit.
|
233 |
+
|
234 |
+
Instructions:
|
235 |
+
1) Describe the learning experience. Include a few key topics, age and integrations.
|
236 |
+
2) Press the 'Generate Unit' button.
|
237 |
+
3) Review in the unit section.
|
238 |
+
4) Go to the next section.
|
239 |
+
""")
|
240 |
+
|
241 |
+
unit_vision = gr.Textbox(label="Input your vision here:")
|
242 |
+
b1 = gr.Button("Generate Unit")
|
243 |
+
unit = gr.Textbox(label="Generated unit:",show_copy_button=True)
|
244 |
+
|
245 |
+
with gr.Tab("Unit --> Lesson Ideas"):
|
246 |
+
gr.Markdown(
|
247 |
+
"""
|
248 |
+
|
249 |
+
This tool will take the generated unit from the "Vision to Unit" tool to create a few relevant lesson idea.
|
250 |
+
|
251 |
+
Instructions:
|
252 |
+
1) Press the 'Generate Unit' button.
|
253 |
+
2) Review the ideas.
|
254 |
+
3) Identify the one you want to expand upon. Highlight and copy to clipboard.
|
255 |
+
4) Go to the next section.
|
256 |
+
""")
|
257 |
+
b2 = gr.Button("Generate Lesson Ideas")
|
258 |
+
lesson_ideas = gr.Textbox(label="Lesson Ideas:")
|
259 |
+
|
260 |
+
with gr.Tab("Lesson Ideas --> Lesson Plan"):
|
261 |
+
gr.Markdown(
|
262 |
+
"""
|
263 |
+
|
264 |
+
This tool takes an lesson idea and generates a complete lesson plan.
|
265 |
+
|
266 |
+
Instructions:
|
267 |
+
1) Paste one of the generated ideas ( or your own original )
|
268 |
+
2) Add additional considerations: time, number of kids, age, etc.
|
269 |
+
3) Press the 'Generate Lesson Plan' button.
|
270 |
+
4) Read the lesson plan.
|
271 |
+
5) Do it again!
|
272 |
+
""")
|
273 |
+
lesson_description = gr.Textbox(label="Input lesson idea:")
|
274 |
+
b3 = gr.Button("Generate Lesson Plan")
|
275 |
+
lesson_plan = gr.Textbox(label="Lesson Plan:",show_copy_button=True)
|
276 |
+
|
277 |
+
b1.click(generate_unit, inputs=unit_vision, outputs=unit)
|
278 |
+
b2.click(generate_lesson_ideas, inputs=unit, outputs=lesson_ideas)
|
279 |
+
b3.click(generate_lesson_plan, inputs=[unit,lesson_description], outputs=lesson_plan)
|
280 |
+
|
281 |
+
app.queue().launch()
|