From f247a975d81ed89a42271d1b6baf464f8f335e8d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Miquel?= Date: Tue, 10 Mar 2026 15:59:17 +0100 Subject: [PATCH] Larger boxes ; avoid feedback on confusing letters --- annotating_with_checks.py | 11 ++++++----- correction.py | 4 ++++ 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/annotating_with_checks.py b/annotating_with_checks.py index 2fd2587..0a36854 100644 --- a/annotating_with_checks.py +++ b/annotating_with_checks.py @@ -8,8 +8,8 @@ import img2pdf from reportlab.pdfgen import canvas # Fix for Matplotlib in threads: Set backend to non-interactive 'Agg' -import matplotlib -matplotlib.use('Agg') +# import matplotlib +# matplotlib.use('Agg') from PIL import Image, ImageDraw, ImageFont import annotating @@ -19,7 +19,7 @@ from annotating import MARGIN_LEFT, ANNOT_WIDTH LATEX_LOCK = threading.Lock() DPI = 100 BOX_SIZE = 30 -SCORE_BOX_SIZE = 30 +SCORE_BOX_SIZE = 40 SCORES = [x * 0.5 for x in range(9)] # 0.0 to 4.0 try: @@ -60,12 +60,13 @@ class CheckboxRenderer: # Draw score boxes start_x = pos['w'] + 20 for val in SCORES: - box = draw_checkbox(draw, start_x, pos['y'] + 25, BOX_SIZE, str(val)) + box = draw_checkbox(draw, start_x, pos['y'] + 25, + SCORE_BOX_SIZE, str(val)) self.checkboxes.append({ "type": "score", "label": self.label, "value": val, "rel_box": box # Will be adjusted for global Y later }) - start_x += BOX_SIZE + 60 + start_x += SCORE_BOX_SIZE + 60 elif meta.get("type") == "global_fb": # Draw delete box for global feedback bx = pos['w'] - BOX_SIZE - 5 diff --git a/correction.py b/correction.py index 382ae0c..02b3f15 100644 --- a/correction.py +++ b/correction.py @@ -71,6 +71,10 @@ isn't, provide the coordinates where the word «continuous» is. If a calculation went wrong, gives the coordinates of the step where it goes wrong, and as feedback, what went wrong. +Avoid giving feedback about confusing letters `n` with `m`, `x` with +`n` or `h` with `k`. If it looks wrong, assume you read it wrong, +unless the distinction is very important. + You should also give me a measure of confidence, from 0 to 1 that you were able to correctly understand the answer. A score below 0.5 means that you think it is likely that you couldn't understand an important