RohitChandramouli6618 commited on
Commit
5704043
·
1 Parent(s): bfd93c7

Add root HTML endpoint for App tab display

Browse files
Files changed (1) hide show
  1. server/app.py +23 -1
server/app.py CHANGED
@@ -18,4 +18,26 @@ app = create_app(
18
  EpidemicContainmentEnv,
19
  ContainmentAction,
20
  CityObservation,
21
- )
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
18
  EpidemicContainmentEnv,
19
  ContainmentAction,
20
  CityObservation,
21
+ )
22
+
23
+ from fastapi.responses import HTMLResponse
24
+
25
+ @app.get("/", response_class=HTMLResponse)
26
+ async def root():
27
+ return """
28
+ <html>
29
+ <body style="font-family: sans-serif; padding: 2rem; background: #0f172a; color: #e2e8f0;">
30
+ <h1>🦠 Cascade Containment</h1>
31
+ <p>An RL benchmark for epidemic containment policy under uncertainty.</p>
32
+ <p>Status: <strong style="color: #4ade80;">Running</strong></p>
33
+ <h3>Endpoints</h3>
34
+ <ul>
35
+ <li><a href="/health" style="color: #60a5fa;">/health</a> — Health check</li>
36
+ <li>/reset — Start new episode</li>
37
+ <li>/step — Take action</li>
38
+ <li>/state — Get episode state</li>
39
+ </ul>
40
+ <p><a href="https://huggingface.co/spaces/RohitChandramouli6618/cascade-containment" style="color: #60a5fa;">View on HF Spaces</a></p>
41
+ </body>
42
+ </html>
43
+ """