value / web /__init__.py
bonita2026's picture
Deploy Pablo v21 (3 client routes, doc upload, single Opus 4.8) + Verde Institucional theme
7b97ccd verified
Raw History Blame Contribute Delete
1.55 kB
"""Web layer of the Real Estate & Infrastructure Agent (v21).
This package is the Hugging Face Spaces deployment of the program:
- :mod:`web.routes` — form-driven adapters over the EXISTING route logic
(``scripts/*.py``); nothing is re-implemented here, and every status the
scripts report (``LIVE`` / ``PARTIAL_LIVE`` / ``NO_LIVE_MARKET_DATA``,
``COMPLETE`` / ``PARTIAL`` / ``FAILED``, ``PASS`` / ``CONDITIONAL`` /
``BLOCKED`` …) is surfaced verbatim.
- :mod:`web.email_delivery` — sends a generated document to the person who
asked for it through AWS SES, and notifies RailNexus with the requester's
name and e-mail ONLY. No database, no log file, no persistence of any kind.
- :mod:`web.ui` — the Gradio interface (``space_app.py`` launches it).
The package lives outside ``scripts/`` on purpose: the descriptor tests
(``tests/test_v16.py``) assert that ``scripts/*.py`` equals the declared
validation-script set, and ``app.py`` (the route-selective prompt builder)
injects every ``scripts/*.py`` docstring into the system prompt.
"""
from __future__ import annotations
import sys
from pathlib import Path
ROOT = Path(__file__).resolve().parent.parent
SCRIPTS_DIR = ROOT / "scripts"
# The scripts import each other by bare module name (``from agent_version
# import AGENT_VERSION``), exactly as the tests do; make them importable once.
if str(SCRIPTS_DIR) not in sys.path:
sys.path.insert(0, str(SCRIPTS_DIR))
from agent_version import AGENT_VERSION # noqa: E402
__all__ = ["AGENT_VERSION", "ROOT", "SCRIPTS_DIR"]