Spaces:
Sleeping
Sleeping
iterate through distractor lists to allow for more distractors
Browse files
app.py
CHANGED
|
@@ -157,7 +157,8 @@ Afleiders:
|
|
| 157 |
Het perifere zenuwstelsel
|
| 158 |
Het motorische zenuwstelsel
|
| 159 |
Het parasympathisch zenuwstelsel
|
| 160 |
-
Het quadratische zenuwstelsel
|
|
|
|
| 161 |
|
| 162 |
## Define the messages for stepFive
|
| 163 |
#UserPrompt41 = r""""""
|
|
@@ -267,8 +268,10 @@ def chatbot(input):
|
|
| 267 |
probabilities = [0.25, 0.25, 0.25, 0.25] # 25% each (dit kan ongetwijfeld makkelijker en beter.. #quickfix)
|
| 268 |
# Randomly choose between OneTrue and NoneTrue based on the probabilities
|
| 269 |
random_version = random.choices([exercise_1, exercise_2, exercise_3, exercise_4], weights=probabilities, k=1)[0]
|
| 270 |
-
distractor_list =
|
| 271 |
-
|
|
|
|
|
|
|
| 272 |
|
| 273 |
|
| 274 |
|
|
|
|
| 157 |
Het perifere zenuwstelsel
|
| 158 |
Het motorische zenuwstelsel
|
| 159 |
Het parasympathisch zenuwstelsel
|
| 160 |
+
Het quadratische zenuwstelsel
|
| 161 |
+
Het cranialezenuwstelsel"""
|
| 162 |
|
| 163 |
## Define the messages for stepFive
|
| 164 |
#UserPrompt41 = r""""""
|
|
|
|
| 268 |
probabilities = [0.25, 0.25, 0.25, 0.25] # 25% each (dit kan ongetwijfeld makkelijker en beter.. #quickfix)
|
| 269 |
# Randomly choose between OneTrue and NoneTrue based on the probabilities
|
| 270 |
random_version = random.choices([exercise_1, exercise_2, exercise_3, exercise_4], weights=probabilities, k=1)[0]
|
| 271 |
+
distractor_list = ""
|
| 272 |
+
for distractor in distractors
|
| 273 |
+
distractor_list += f"{distractor}\n"
|
| 274 |
+
return distractor_list + f"\n\n- - - - -\nbij de vraag:\n{question}\nmet antwoord:\n{answer}"
|
| 275 |
|
| 276 |
|
| 277 |
|