Spaces:
Runtime error
Runtime error
Commit History
-
Fix AI insight leaking thinking content + make insights on-demand instead of auto-generated
9cbb438 -
UX overhaul + Gradio migration + remove llama.cpp
e6970ed
-
fix: load LLM in background thread so Space stays healthy during 2.84 GB cold start
Previously, app.py synchronously called agents.get_llm() at import time. For HF Spaces, this meant uvicorn did not open its port until the 2.84 GB download + model load completed. If the download took longer than the Space's startup health-check window, the container was marked unhealthy and restarted, looping forever. generate() was also blocking on first use — the first chat/mentor request would stall while the model loaded. Refactor: - agents.py: split into _do_load() (background) + start_background_load() + non-blocking generate(). Status transitions: uninitialized -> loading -> loaded | error | mock generate() returns '' while status != loaded, so per-feature deterministic fallbacks (chat_reply, generate_insight, parse_mentor_response) handle every request immediately, and upgrade to real LLM output the moment the background load finishes. - app.py: drop the synchronous eager get_llm(); instead register a FastAPI startup event that calls agents.start_background_l…e5d102f -
feat: browser-local engine, Zerodha dashboard, historical events, chatbot, per-user isolation
- Port engine to JS (static/engine.js) and events to JS (static/events.js) so the game runs 100% in the browser; every tab has its own state - Reduce server to static + LLM endpoints only (/api/chat, /api/mentor, /api/insight, /api/health) - no more shared server game state - Deterministic local NPC agents (whale/retail/permabull) react to the historical event regime - no LLM needed for game state - Historical events timeline (events.py + events.js): 1994 RBI rate hike, 1995 peso crisis, 1997 Asian crisis, 1998 Pokhran sanctions, 1999 Kargil, 2000 dot-com crash, 2001 9/11 + Enron, 2002 IT boom, 2003 Iraq war, 2004 election - each with realistic per-asset impacts - Zerodha-style dashboard: top index bar, left market watch, center chart with Y/X axis labels, right order pad + chatbot, bottom positions table with cost basis, current value, P&L, P&L% - Chart with asset selector chips (Net Worth / Nifty 50 / Nifty IT / Gold / Crypto / Real Estate), proper axis labels and g…f316f5a -
fix: serve static files, switch to FastAPI, add CRT terminal styling
2df7867
-
Phase 2/3: Gradio Server backend, CRT frontend, engine, agents, mentor, tests, CI/CD
1d0b04b