range / examples.py
Brianferrell787's picture
RANGE: clean package identity, example taxonomy API, Gradio 6.27.0
c4aee46 verified
Raw History Blame Contribute Delete
1.9 kB
"""Curated examples for the RANGE Hugging Face Space demo."""
from __future__ import annotations
ARTICLE_EXAMPLES: tuple[tuple[str, str, str, str], ...] = (
(
"Relevant 路 CPI, Federal Reserve, and broad benchmarks",
"CPI inflation cooled after the Federal Reserve cut the federal funds rate. "
"The S&P 500 and Nasdaq-100 advanced.",
"2025-01-15T10:30:00-05:00",
"macro-inflation-1",
),
(
"Relevant 路 labor-market indicators",
"Initial jobless claims rose while nonfarm payroll growth slowed.",
"2025-01-16T08:30:00-05:00",
"macro-labor-1",
),
(
"Relevant 路 rates and credit conditions",
"Treasury yields fell and credit spreads narrowed after the policy announcement.",
"2025-01-17T14:15:00-05:00",
"financial-conditions-1",
),
(
"Relevant 路 Russell 2000 benchmark",
"The Russell 2000 gained as investors rotated toward smaller companies.",
"2025-01-21T11:05:00-05:00",
"benchmark-1",
),
(
"Relevant context 路 no supported broad exposure",
"The software company announced quarterly earnings and a share repurchase.",
"2025-01-22T16:05:00-05:00",
"company-context-1",
),
(
"No configured match 路 local-news control",
"The city opened a new public garden after a week of mild weather.",
"2025-01-23T09:00:00-05:00",
"control-1",
),
)
SINGLE_EXAMPLES: list[list[str]] = [
[text, timestamp, article_id, "demo"]
for _label, text, timestamp, article_id in ARTICLE_EXAMPLES
]
BATCH_ROWS: list[list[str]] = [
[article_id, timestamp, "demo", text]
for _label, text, timestamp, article_id in ARTICLE_EXAMPLES
]
__all__ = ["ARTICLE_EXAMPLES", "BATCH_ROWS", "SINGLE_EXAMPLES"]