Spaces:
Runtime error
Runtime error
Errolmking
commited on
Commit
·
12a66ee
1
Parent(s):
7f78bf1
Update app.py
Browse files
app.py
CHANGED
@@ -94,7 +94,7 @@ class QueueCallback(BaseCallbackHandler):
|
|
94 |
def on_llm_end(self, *args, **kwargs: Any) -> None:
|
95 |
return self.q.empty()
|
96 |
|
97 |
-
class
|
98 |
|
99 |
def __init__(self, prompt_template='', model_name=MODEL, verbose=False, temp=0.2):
|
100 |
self.verbose = verbose
|
@@ -171,7 +171,7 @@ unit_generator_prompt = """
|
|
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 =
|
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).
|
@@ -182,7 +182,7 @@ lesson_idea_generator_prompt = """
|
|
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 =
|
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).
|
@@ -195,7 +195,7 @@ lesson_builder_prompt = """
|
|
195 |
Explain how this lesson supports the unit.
|
196 |
"""
|
197 |
|
198 |
-
lesson_builder =
|
199 |
|
200 |
def generate_unit(input):
|
201 |
for next_token, content in unit_generator.stream(input):
|
|
|
94 |
def on_llm_end(self, *args, **kwargs: Any) -> None:
|
95 |
return self.q.empty()
|
96 |
|
97 |
+
class Agent:
|
98 |
|
99 |
def __init__(self, prompt_template='', model_name=MODEL, verbose=False, temp=0.2):
|
100 |
self.verbose = verbose
|
|
|
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 = Agent(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).
|
|
|
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 = Agent(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).
|
|
|
195 |
Explain how this lesson supports the unit.
|
196 |
"""
|
197 |
|
198 |
+
lesson_builder = Agent(prompt_template=lesson_builder_prompt)
|
199 |
|
200 |
def generate_unit(input):
|
201 |
for next_token, content in unit_generator.stream(input):
|