SayedZahur786 commited on
Commit
d95e083
·
2 Parent(s): 1d762f37423aa7

Merge branch 'main' of https://github.com/garvitsachdevaa/911-Dispatch-Supervisor

Browse files
Files changed (2) hide show
  1. README.md +11 -0
  2. src/server/app.py +12 -0
README.md CHANGED
@@ -1,3 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
1
 
2
  # 🚨 911 Dispatch Supervisor
3
 
 
1
+ ---
2
+ title: 911 Dispatch Supervisor
3
+ emoji: "🚨"
4
+ colorFrom: red
5
+ colorTo: gray
6
+ sdk: docker
7
+ app_port: 7860
8
+ tags:
9
+ - openenv
10
+ pinned: false
11
+ ---
12
 
13
  # 🚨 911 Dispatch Supervisor
14
 
src/server/app.py CHANGED
@@ -41,6 +41,18 @@ async def runtime_error_handler(request, exc: RuntimeError):
41
  return JSONResponse(status_code=500, content={"detail": str(exc)})
42
 
43
 
 
 
 
 
 
 
 
 
 
 
 
 
44
  @app.get("/health")
45
  async def health() -> dict[str, str]:
46
  # OpenEnv runtime validation expects status=healthy
 
41
  return JSONResponse(status_code=500, content={"detail": str(exc)})
42
 
43
 
44
+ @app.get("/", include_in_schema=False)
45
+ async def root() -> dict[str, Any]:
46
+ """Root endpoint for Spaces health probes and browser landing."""
47
+ return {
48
+ "status": "healthy",
49
+ "service": "citywide-dispatch-supervisor",
50
+ "health": "/health",
51
+ "tasks": "/tasks",
52
+ "dashboard_state": "/dashboard/state",
53
+ }
54
+
55
+
56
  @app.get("/health")
57
  async def health() -> dict[str, str]:
58
  # OpenEnv runtime validation expects status=healthy