Spaces:
Running
Running
Commit History
15 days ago
-
Improved UI: Shows each run as four connected stages: Plan, Search, Rank, Answer Running
f341754
-
Expand the calendar corpus to every faculty, and rewrite the UI copy
Devdan Schretlen +1: Claude Opus 5 (1M context)Corpus: the live crawl covered only the Faculty of Science subtree, five cohort-split programs and three course subjects. It now covers every faculty/college/school plus all 264 course-description subjects, taking the index from 3,770 to 16,576 chunks over 1,702 pages. Subject pages are taxonomy terms the sitemap omits, so enumerate_subjects() reads them from the "Courses by Subject" index at crawl time rather than from a hardcoded list that would go stale. The archive edition keeps its own narrow subject list (ARCHIVE_SUBJECT_PATHS): mirroring 264 more subject pages would double the crawl and blunt the edition-collision trap into generic noise. academic-staff pages are excluded. They are per-faculty rosters of people (114 pages, one a single 159,000-character list of names) that answer nothing about courses, programs or policies, so they were pure retrieval distraction, and the largest exceeded what the embedding model accepts. Two bugs the wider corpus exposed: * chunk_body onl…fcdba1d
-
Render the answer as Markdown, bound API timeouts, fix a false notice
Devdan Schretlen +1: Claude Opus 5 (1M context)Three defects surfaced by a pre-purchase readiness audit. None blocked deployment; all are cheap and user-visible. 1. The answer panel html.escape()d the model's output into a pre-wrap block, so Markdown showed as literal characters. 19 of the 24 recorded answers contain '#', '##' or '**' -- one opens "# Bachelor of Arts: Degree Requirements Comparison". The answer output is now a gr.Markdown component and the renderer emits Markdown, which Gradio renders and sanitises natively: no new dependency and no hand-rolled converter. Source links escape square brackets, since calendar titles carry the edition that way ("Academic Standing [2026/27]"). 2. No hosted client passed an explicit timeout, so the SDK defaults applied: 600 s read for Anthropic and OpenAI, 300 s for Cohere. With concurrency_limit=1 a single stalled call holds the demo's only slot for ten minutes. Real calls take 1-5 s, so config.API_TIMEOUT (UBCAL_API_TIMEOUT, default 60 s) now applies to …9db5d1e -
Correct the app.py docstring about ZeroGPU
Devdan Schretlen +1: Claude Opus 5 (1M context)The docstring claimed the free ZeroGPU allowance made this Space free. It does not: ZeroGPU requires the Space to contain a GPU workload, and without one it builds, starts, and is then killed with "No @spaces.GPU function detected during startup". Moving an existing Gradio Space to cpu-basic on a free account returns 402 Payment Required. This pipeline is numpy plus three hosted APIs with nothing to accelerate, so it runs on cpu-basic and needs an HF PRO account. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>70520b5 -
Bill paid API calls from the worker thread, not the stream consumer
Devdan Schretlen +1: Claude Opus 5 (1M context)A pre-flight audit of the Gradio Space found that limits.record() sat after the streaming loop with no try/finally. Gradio closes the generator when a visitor navigates away or drops the connection, raising GeneratorExit at a yield -- but the pipeline runs on a detached daemon thread that is never cancelled and goes on to complete every paid OpenAI/Cohere/Anthropic call. Those calls were made and never counted. That matters because the global daily ceiling, not the per-IP window, is the actual spend bound: limits.check() tests DAILY_LLM_CALLS before it looks at the per-IP hour/day windows, so it is what holds when someone forges X-Forwarded-For. A ceiling that does not advance on cancelled runs is not a ceiling. Tallying in a finally around the streaming loop would not have fixed it -- the counter was fed by Renderer.feed(), which only the consumer calls, so the tally would be partial while the detached thread kept spending. So count at the source: the worker's trace sink folds each …620acd3 -
Added FastAPI app for live HuggingFace demo
Devdan Schretlen024efc3