Spaces:
Running
Running
Commit Β·
ce58f57
1
Parent(s): 774151b
outline
Browse files
app.py
CHANGED
|
@@ -596,17 +596,30 @@ PROMPT_BULLETS = {
|
|
| 596 |
"Synthesize factual features (Step 1) and behavioral patterns (Step 2) to infer household income bracket",
|
| 597 |
"Score location economic indicators: luxury / mid-range / budget venue distribution",
|
| 598 |
"Consider transportation mode signals, activity diversity, and temporal flexibility as income proxies",
|
| 599 |
-
"Output: <code>INCOME_PREDICTION</code> β a single income range",
|
| 600 |
"Output: <code>INCOME_REASONING</code> β evidence-grounded justification referencing specific mobility observations",
|
| 601 |
],
|
| 602 |
}
|
| 603 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 604 |
def _extract_prompt_instruction(prompt_text, stage):
|
| 605 |
bullets = PROMPT_BULLETS.get(stage, [])
|
| 606 |
if not bullets:
|
| 607 |
return ''
|
| 608 |
-
|
| 609 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 610 |
|
| 611 |
|
| 612 |
# ββ Body renderers ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
|
|
|
| 596 |
"Synthesize factual features (Step 1) and behavioral patterns (Step 2) to infer household income bracket",
|
| 597 |
"Score location economic indicators: luxury / mid-range / budget venue distribution",
|
| 598 |
"Consider transportation mode signals, activity diversity, and temporal flexibility as income proxies",
|
| 599 |
+
"Output: <code>INCOME_PREDICTION</code> β a single income range with confidence rating (1β5)",
|
| 600 |
"Output: <code>INCOME_REASONING</code> β evidence-grounded justification referencing specific mobility observations",
|
| 601 |
],
|
| 602 |
}
|
| 603 |
|
| 604 |
+
PROMPT_INPUTS = {
|
| 605 |
+
1: "β‘ Activity Chronicles + β’ Visiting Summaries β detailed daily visit logs and weekly behavioral statistics generated from raw stay points",
|
| 606 |
+
2: "Stage 1 response β factual features extracted from Activity Chronicles",
|
| 607 |
+
3: "Stage 1 + Stage 2 responses β feature extraction and behavioral abstraction combined",
|
| 608 |
+
}
|
| 609 |
+
|
| 610 |
+
_INPUT_TAG = ('<span style="font-family:\'DM Mono\',monospace;font-size:9px;font-weight:600;'
|
| 611 |
+
'letter-spacing:0.08em;text-transform:uppercase;color:#888;margin-right:6px;">Input</span>')
|
| 612 |
+
|
| 613 |
def _extract_prompt_instruction(prompt_text, stage):
|
| 614 |
bullets = PROMPT_BULLETS.get(stage, [])
|
| 615 |
if not bullets:
|
| 616 |
return ''
|
| 617 |
+
inp = PROMPT_INPUTS.get(stage, '')
|
| 618 |
+
input_block = ('<div style="margin-bottom:8px;padding:6px 10px;background:rgba(0,0,0,0.04);'
|
| 619 |
+
'border-radius:6px;font-size:10.5px;line-height:1.6;">'
|
| 620 |
+
+ _INPUT_TAG + inp + '</div>')
|
| 621 |
+
items = ''.join('<li>' + b + '</li>' for b in bullets)
|
| 622 |
+
return input_block + '<ul class="hct-prompt-list">' + items + '</ul>'
|
| 623 |
|
| 624 |
|
| 625 |
# ββ Body renderers ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|