Spaces:
Runtime error
Runtime error
Commit History
-
fix: make topic model deterministic across runs [ai]
Cache _run_pipeline with @st.cache_data so repeated queries skip re-running LLM calls. Seed Python random and numpy before BERTopic fit_transform, and pin KMeans to n_init=1, random_state=42.4287c66
-
feat: compare current vs previous period topics to surface emerging research [ai]
Runs the full pipeline twice — current period (last N months) and the preceding N-month window — then uses an LLM to compare the two sets of topic summaries and identify what's emerging and what disappeared. UI shows: - Current period topics with a 🆕 badge on emerging ones - Narrative comparison ("what shifted between periods") - "No longer prominent" list of disappeared topics - Previous period topics in a collapsible section Changes: - open_alex: add previous_period_date_range() and get_openalex_papers_for_period() so fetch can target any explicit date window - topic_model_llm: add PeriodComparison model and compare_topic_periods() LLM call - streamlit_app: refactor around two-period pipeline; comparison result cached via @st.cache_data keyed on serialised summaries JSON Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>147c97e -
refactor: load SBERT model once via st.cache_resource [ai]
semantic_rerank and run_topic_model now accept the model as an argument instead of loading it internally. A single @st.cache_resource function in streamlit_app.py owns the model lifecycle, so the cold load happens only once per server session regardless of how many queries are run. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>f946e69 -
feat: relax constraint on topic filtering
5120451 -
feat: semantic rerank top 200 from 500 fetched papers using SBERT [ai]
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>486a5f3 -
feat: filter irrelevant topics using LLM before summarization [ai]
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>a7971e9 -
feat: improve topic model top words
7df4176 -
fix: tighten prompt to prevent 'This topic' prefix in summaries [ai]
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>df36bfe -
refactor: pass client and model explicitly, constants from env vars [ai]
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>c0dfa9a -
feat: return TopicModelResult with model object and assignments [ai]
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>7d9b711 -
refactor: add run_topic_model wrapper, simplify playground script [ai]
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>04e1d4a -
refactor: switch to custom provider, K=10, json_object mode [ai]
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>47f3eb5 -
feat: create topic model enhanced by llm
42d4122