Spaces:
Running on Zero
Running on Zero
Commit History
29 days ago
-
feat: switch to Postgres, add intent router and a warmer persona
Database - Replace SQLite (aiosqlite) with PostgreSQL via asyncpg. All state lived on the container's ephemeral filesystem, which is why every redeploy wiped it. - Add versioned migrations (database/migrations/NNN_*.sql) recorded in schema_migrations with checksums. The old CREATE-IF-NOT-EXISTS approach could not evolve the schema, and the live DB had drifted (orphaned google_calendar_tokens table). - Drop write-only daily_nutrition cache; totals recompute from food_logs so edits stay consistent. - connection.py keeps the small subset of the aiosqlite API the services use (`await db.execute`, `async with db.execute as cursor`, fetchone/fetchall) and translates ? placeholders to $n, so call sites were left untouched. - Store activity_dt as TIMESTAMPTZ and drop the string-comparison reminder query; reminders are now correct for WIB/WITA/WIT users. - Add scripts/migrate_sqlite_to_postgres.py to move the existing 4 users, 26 food logs and 160 conversations across with ids…1fcc069
-
fix: register ZeroGPU callback with Gradio
c968025 -
fix: support ZeroGPU Space runtime
4a1c368 -
fix: run bot worker using official app.run_polling with dedicated loop and stop_signals=None
a27e4b0 -
fix: replace Gradio with pure Python http.server for stable HF Space hosting
2ceaa55 -
fix: add explicit main thread keep-alive loop to prevent container exit in HF Space
9d1a72a -
fix: use async context manager for telegram bot to avoid signal/shutdown conflicts in HF Spaces
8daa0fb -
fix: launch Gradio non-blocking and run Telegram bot on main thread
68903fc -
fix: initialize asyncio event loop in background thread for telegram polling
b729e4c -
fix: support BOT_TOKEN and TELEGRAM_BOT_TOKEN env vars and avoid port clash
1e947e0 -
feat: add Gradio entry point for Hugging Face free space
5d658a8