GreenStar24 commited on
Commit
67eefaa
·
1 Parent(s): 51e1a5a
Files changed (1) hide show
  1. app.py +28 -8
app.py CHANGED
@@ -66,6 +66,31 @@ SHEET_COLUMNS = [
66
  ]
67
  SHEET_HEADERS = [label for _, label in SHEET_COLUMNS]
68
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
69
 
70
  def get_model_name():
71
  return os.environ.get("OPENAI_MODEL_NAME", DEFAULT_MODEL_NAME)
@@ -1812,12 +1837,7 @@ def build_practice_scoring_note(submission_result):
1812
  total_cases = submission_result["total_cases"]
1813
  return (
1814
  f"This practice score is based on {total_cases} hidden calibration cases. "
1815
- "Each case is run 3 times to check prompt consistency. In each run, "
1816
- "LLM 1 can earn up to 1 point for correct routing and target-firm "
1817
- "normalization, and LLM 3 can earn up to 1 point for a correct final "
1818
- "JSON answer with supported citations. Step 2 is not scored directly, "
1819
- "but it affects the LLM 3 score because LLM 3 relies on the snippet-level "
1820
- "analysis. The final submission uses a separate hidden holdout set."
1821
  )
1822
 
1823
 
@@ -2023,7 +2043,7 @@ def handle_submission(submission_type, email, name, s1, s2, s3):
2023
 
2024
 
2025
  def build_interface():
2026
- with gr.Blocks() as demo:
2027
  gr.Markdown(
2028
  """
2029
  # Applicant Task: Target Company & Law Firm Identification
@@ -2170,7 +2190,7 @@ def build_interface():
2170
 
2171
  gr.Markdown(
2172
  """
2173
- <div style="background-color:#fff7e6; padding:16px; border-radius:8px; border:1px solid #ffe5b4; margin-bottom:1em;">
2174
  <b>Please note:</b><br>
2175
  Each run may take a couple of minutes.<br>
2176
  After you click a button, wait for the result and do not click it again.
 
66
  ]
67
  SHEET_HEADERS = [label for _, label in SHEET_COLUMNS]
68
 
69
+ APP_CSS = """
70
+ .submission-note {
71
+ background: var(--submission-note-bg, #fff7e6);
72
+ border: 1px solid var(--submission-note-border, #ffe5b4);
73
+ border-radius: 8px;
74
+ color: var(--submission-note-text, #3d2b00);
75
+ margin-bottom: 1em;
76
+ padding: 16px;
77
+ }
78
+
79
+ @media (prefers-color-scheme: dark) {
80
+ .submission-note {
81
+ --submission-note-bg: #2b2111;
82
+ --submission-note-border: #6b4b18;
83
+ --submission-note-text: #f7e8c5;
84
+ }
85
+ }
86
+
87
+ .dark .submission-note {
88
+ --submission-note-bg: #2b2111;
89
+ --submission-note-border: #6b4b18;
90
+ --submission-note-text: #f7e8c5;
91
+ }
92
+ """
93
+
94
 
95
  def get_model_name():
96
  return os.environ.get("OPENAI_MODEL_NAME", DEFAULT_MODEL_NAME)
 
1837
  total_cases = submission_result["total_cases"]
1838
  return (
1839
  f"This practice score is based on {total_cases} hidden calibration cases. "
1840
+ "Each case is run 3 times to check prompt consistency."
 
 
 
 
 
1841
  )
1842
 
1843
 
 
2043
 
2044
 
2045
  def build_interface():
2046
+ with gr.Blocks(css=APP_CSS) as demo:
2047
  gr.Markdown(
2048
  """
2049
  # Applicant Task: Target Company & Law Firm Identification
 
2190
 
2191
  gr.Markdown(
2192
  """
2193
+ <div class="submission-note">
2194
  <b>Please note:</b><br>
2195
  Each run may take a couple of minutes.<br>
2196
  After you click a button, wait for the result and do not click it again.