Skip to content

Commit 1ba2aa6

Browse files
committed
test mark
1 parent c410481 commit 1ba2aa6

1 file changed

Lines changed: 8 additions & 8 deletions

File tree

evaluation_function/evaluation.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ def append_feedback(title, text):
5858
# Use standard Markdown for all feedback items
5959
# Title as level 2 heading, text as Markdown body
6060
markdown_title = f"## {title.strip()}\n"
61-
markdown_body = text.strip() + "\n\n"
61+
markdown_body = text.strip() + "\n"
6262
feedback_items.append((markdown_title, markdown_body))
6363

6464
def get_class_color(class_name):
@@ -286,7 +286,7 @@ def analyze_images(images, draw_images=True):
286286
if target_class:
287287
append_feedback(
288288
"Target",
289-
f"**Target component:** `{target_class}`",
289+
f"### Target component: {target_class}\n---\n",
290290
)
291291

292292
if response_detection and len(response) > 1:
@@ -296,11 +296,11 @@ def analyze_images(images, draw_images=True):
296296
)
297297
append_feedback(
298298
"Overall Best",
299-
f"**Best detection across all images**\n\n"
299+
f"### Best detection across all images\n\n"
300300
f"- **Image:** `{overall_name}`\n"
301301
f"- **Detected Component:** `{response_detection}`\n"
302302
f"- **Confidence:** `{response_conf:.2f}`\n"
303-
f"- **Source:** `{origin}`\n",
303+
f"- **Source:** `{origin}`\n---\n",
304304
)
305305

306306
upload_times = []
@@ -321,16 +321,16 @@ def analyze_images(images, draw_images=True):
321321
)
322322
append_feedback(
323323
f"Image [{idx}]",
324-
f"**Image:** `{orig_name}`\n\n{text}"
324+
f"### Image: {orig_name}\n{text}\n"
325325
)
326326
if draw_images and img is not None:
327327
upload_start = time.time()
328328
try:
329329
url = upload_image(img, "eduvision")
330330
# add separate feedback for this uploaded annotated image (Markdown image)
331-
append_feedback(f"Uploaded Image [{idx}]", f"![{orig_name}]({url})")
331+
append_feedback(f"Uploaded Image [{idx}]", f"![{orig_name}]({url})\n---\n")
332332
except:
333-
append_feedback(f"Uploaded Image [{idx}]", f"*Image upload failed for `{orig_name}`*")
333+
append_feedback(f"Uploaded Image [{idx}]", f"*Image upload failed for {orig_name}*\n---\n")
334334
upload_times.append(time.time() - upload_start)
335335
else:
336336
upload_times.append(0.0)
@@ -346,7 +346,7 @@ def analyze_images(images, draw_images=True):
346346
if params.get('debug_response', False):
347347
# print response structure for debugging purposes
348348
try:
349-
append_feedback("DEBUG Response Structure", f"```python\n{repr(response)}\n```")
349+
append_feedback("DEBUG Response Structure", f"**Response Structur:** {repr(response)}")
350350
print("DEBUG Response Structure:", repr(response))
351351
except Exception as e:
352352
append_feedback("Failed to print response structure", f"{e}")

0 commit comments

Comments
 (0)