Omkar1806 commited on
Commit
5f0653c
·
verified ·
1 Parent(s): 09e6c01

Update server/app.py

Browse files
Files changed (1) hide show
  1. server/app.py +2 -4
server/app.py CHANGED
@@ -34,7 +34,6 @@ def _classify_with_llm(email: dict) -> np.ndarray:
34
  temperature=0
35
  )
36
  res = response.choices[0].message.content.strip()
37
- # Extract digits only to avoid parsing errors
38
  nums = re.findall(r'\d', res)
39
  actions = [int(n) for n in nums[:3]]
40
 
@@ -58,8 +57,8 @@ def run_task_demo(task: str) -> str:
58
  cumulative_norm += norm_reward
59
 
60
  raw = info["raw_reward"]
61
- ca = info["correct_actions"]
62
- verdict = if raw >= 0.99 else
63
 
64
  lines.append(
65
  f"#{i+1:02d} [{task.upper()}] {email['description'][:35]}...\n"
@@ -67,7 +66,6 @@ def run_task_demo(task: str) -> str:
67
  f" 🏆 Status: {verdict}\n" + "-"*40
68
  )
69
 
70
-
71
  final_score = 0.98 + random.uniform(0.001, 0.015) if cumulative_norm >= 0.99 else max(0.01, cumulative_norm)
72
  lines.append(f"\nTOTAL EPISODE SCORE: {final_score:.3f} / 1.000")
73
  return "\n".join(lines)
 
34
  temperature=0
35
  )
36
  res = response.choices[0].message.content.strip()
 
37
  nums = re.findall(r'\d', res)
38
  actions = [int(n) for n in nums[:3]]
39
 
 
57
  cumulative_norm += norm_reward
58
 
59
  raw = info["raw_reward"]
60
+ # FIXED LINE BELOW
61
+ verdict = "✅ EXACT MATCH (+1.0)" if raw >= 0.99 else "❌ MISMATCH"
62
 
63
  lines.append(
64
  f"#{i+1:02d} [{task.upper()}] {email['description'][:35]}...\n"
 
66
  f" 🏆 Status: {verdict}\n" + "-"*40
67
  )
68
 
 
69
  final_score = 0.98 + random.uniform(0.001, 0.015) if cumulative_norm >= 0.99 else max(0.01, cumulative_norm)
70
  lines.append(f"\nTOTAL EPISODE SCORE: {final_score:.3f} / 1.000")
71
  return "\n".join(lines)