Spaces:
Sleeping
Sleeping
File size: 626 Bytes
02daf9d | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | import sys
import os
from pathlib import Path
# Fix: Ensure 'src' is in sys.path so we can find 'adaptive_alert_triage' and 'openenv_shim'
_HERE = Path(__file__).resolve()
_REPO_ROOT = _HERE.parent.parent
_SRC = _REPO_ROOT / "src"
if _SRC.exists() and str(_SRC) not in sys.path:
sys.path.insert(0, str(_SRC))
from adaptive_alert_triage.server import app
import uvicorn
import os
def main():
"""Main entry point for the server application."""
port = int(os.environ.get("PORT", 7860))
host = os.environ.get("HOST", "0.0.0.0")
uvicorn.run(app, host=host, port=port)
if __name__ == "__main__":
main()
|