Davichick commited on
Commit
2b943be
Β·
verified Β·
1 Parent(s): 8ebad28

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +12 -0
app.py CHANGED
@@ -419,6 +419,18 @@ def evaluate_and_format(question_text, candidate_answer, user_role, user_sector,
419
  "Write an answer first, then send it for evaluation."
420
  ), None
421
 
 
 
 
 
 
 
 
 
 
 
 
 
422
  # ── Preview short-circuit: grade from word count so every heat state
423
  # is reachable. Roughly 6 words per point.
424
  if PREVIEW:
 
419
  "Write an answer first, then send it for evaluation."
420
  ), None
421
 
422
+ # ── Guard 0: Too Short ─────────────────────────────────────────────────────
423
+ if len(candidate_answer.split()) < 3:
424
+ return (
425
+ create_circular_progress("Grade: 1"),
426
+ guard_notice(
427
+ "Answer too short",
428
+ "An interview requires elaboration. A 1 or 2-word response is insufficient to evaluate.",
429
+ tone="ember"
430
+ ),
431
+ 1,
432
+ )
433
+
434
  # ── Preview short-circuit: grade from word count so every heat state
435
  # is reachable. Roughly 6 words per point.
436
  if PREVIEW: