amount_of_intermediate_distractors keyError
Browse files- app.py +4 -4
- config/templates.py +4 -4
app.py
CHANGED
|
@@ -198,8 +198,8 @@ with gr.Blocks() as interface:
|
|
| 198 |
gr.HTML(
|
| 199 |
"""
|
| 200 |
<div style="margin-bottom: 10px;">
|
| 201 |
-
<span style="font-size: 1.5em; cursor: help;" title="Diagnose exercise: Diagnoses potential issues for the given exercise(s).">
|
| 202 |
-
ℹ️ <i
|
| 203 |
</span>
|
| 204 |
</div>
|
| 205 |
"""
|
|
@@ -216,7 +216,7 @@ with gr.Blocks() as interface:
|
|
| 216 |
exercise_format_validate = gr.Dropdown(
|
| 217 |
choices=["Markdown", "XML", "Plaintext", "Raw (input unconverted)"],
|
| 218 |
value="Markdown",
|
| 219 |
-
label="Exercise Format (
|
| 220 |
interactive=True,
|
| 221 |
)
|
| 222 |
sampling_count_validate = gr.Dropdown(
|
|
@@ -284,7 +284,7 @@ with gr.Blocks() as interface:
|
|
| 284 |
label="Sampling Count",
|
| 285 |
interactive=True,
|
| 286 |
)
|
| 287 |
-
|
| 288 |
choices=["", "2", "3", "4", "5", "6", "7", "8", "9", "10", "a few", "some", "a whole lot of", "a wide range of", "novel"],
|
| 289 |
value="8",
|
| 290 |
label="Intermediate distractors specification (generated x4 within pipeline)",
|
|
|
|
| 198 |
gr.HTML(
|
| 199 |
"""
|
| 200 |
<div style="margin-bottom: 10px;">
|
| 201 |
+
<span style="font-size: 1.5em; cursor: help;" title="Diagnose exercise: Diagnoses potential issues for the given exercise(s). The Exercise Format">
|
| 202 |
+
ℹ️ <i>←</i>
|
| 203 |
</span>
|
| 204 |
</div>
|
| 205 |
"""
|
|
|
|
| 216 |
exercise_format_validate = gr.Dropdown(
|
| 217 |
choices=["Markdown", "XML", "Plaintext", "Raw (input unconverted)"],
|
| 218 |
value="Markdown",
|
| 219 |
+
label="Exercise Format Standard (for standardization)",
|
| 220 |
interactive=True,
|
| 221 |
)
|
| 222 |
sampling_count_validate = gr.Dropdown(
|
|
|
|
| 284 |
label="Sampling Count",
|
| 285 |
interactive=True,
|
| 286 |
)
|
| 287 |
+
intermediate_distractors_specification = gr.Dropdown(
|
| 288 |
choices=["", "2", "3", "4", "5", "6", "7", "8", "9", "10", "a few", "some", "a whole lot of", "a wide range of", "novel"],
|
| 289 |
value="8",
|
| 290 |
label="Intermediate distractors specification (generated x4 within pipeline)",
|
config/templates.py
CHANGED
|
@@ -189,22 +189,22 @@ diagnose_scorecard_template = ChatPromptTemplate(
|
|
| 189 |
|
| 190 |
template_distractors_brainstorm_1 = ChatPromptTemplate(
|
| 191 |
messages=[
|
| 192 |
-
("system", "You are a brainstorming assistant. Based on the given multiple choice exercise, come up with {
|
| 193 |
"alternative answer options that are not correct, yet also not so implausible that even poorly informed students would immediately dismiss them. Make sure to use the same language as the existing exercise."),
|
| 194 |
("human", "{standardized_exercise}")
|
| 195 |
],
|
| 196 |
-
input_variables=["standardized_exercise", "
|
| 197 |
)
|
| 198 |
|
| 199 |
template_distractors_brainstorm_2 = ChatPromptTemplate(
|
| 200 |
messages=[
|
| 201 |
-
("system", "You are a brainstorming assistant. Based on the given multiple choice exercise, come up with {
|
| 202 |
"alternative answer options that are not correct, yet not so implausible that even poorly informed students would immediately dismiss them. Go about this very methodically: "
|
| 203 |
"Really try to think outside of the box and get creative here, providing potential alternative distractors across a wide range of options. "
|
| 204 |
"Before you present your final selection, take your time to really consider the entire solution space, weighing your different ideas an options, then to list the distractors. Make sure to use the same language as the existing exercise."),
|
| 205 |
("human", "{standardized_exercise}")
|
| 206 |
],
|
| 207 |
-
input_variables=["standardized_exercise", "
|
| 208 |
)
|
| 209 |
|
| 210 |
|
|
|
|
| 189 |
|
| 190 |
template_distractors_brainstorm_1 = ChatPromptTemplate(
|
| 191 |
messages=[
|
| 192 |
+
("system", "You are a brainstorming assistant. Based on the given multiple choice exercise, come up with {intermediate_distractors_specification} additional high-quality distractors: "
|
| 193 |
"alternative answer options that are not correct, yet also not so implausible that even poorly informed students would immediately dismiss them. Make sure to use the same language as the existing exercise."),
|
| 194 |
("human", "{standardized_exercise}")
|
| 195 |
],
|
| 196 |
+
input_variables=["standardized_exercise", "intermediate_distractors_specification"]
|
| 197 |
)
|
| 198 |
|
| 199 |
template_distractors_brainstorm_2 = ChatPromptTemplate(
|
| 200 |
messages=[
|
| 201 |
+
("system", "You are a brainstorming assistant. Based on the given multiple choice exercise, come up with {intermediate_distractors_specification} additional high-quality distractors: "
|
| 202 |
"alternative answer options that are not correct, yet not so implausible that even poorly informed students would immediately dismiss them. Go about this very methodically: "
|
| 203 |
"Really try to think outside of the box and get creative here, providing potential alternative distractors across a wide range of options. "
|
| 204 |
"Before you present your final selection, take your time to really consider the entire solution space, weighing your different ideas an options, then to list the distractors. Make sure to use the same language as the existing exercise."),
|
| 205 |
("human", "{standardized_exercise}")
|
| 206 |
],
|
| 207 |
+
input_variables=["standardized_exercise", "intermediate_distractors_specification"]
|
| 208 |
)
|
| 209 |
|
| 210 |
|