Elliot89 commited on
Commit
2e69352
Β·
1 Parent(s): d5fc8a7

fix: HTML root page so HF Space shows Running status

Browse files
Files changed (1) hide show
  1. server/app.py +20 -8
server/app.py CHANGED
@@ -53,15 +53,27 @@ def health():
53
  return {"status": "ok", "version": "0.1.0"}
54
 
55
 
56
- @app.get("/")
 
 
57
  def root():
58
- return {
59
- "name": "SRE Incident Response OpenEnv",
60
- "version": "0.1.0",
61
- "docs": "/docs",
62
- "health": "/health",
63
- "tasks": "/tasks",
64
- }
 
 
 
 
 
 
 
 
 
 
65
 
66
 
67
  # ── Core OpenEnv endpoints ───────────────────────────────────────────────────
 
53
  return {"status": "ok", "version": "0.1.0"}
54
 
55
 
56
+ from fastapi.responses import HTMLResponse
57
+
58
+ @app.get("/", response_class=HTMLResponse)
59
  def root():
60
+ return """
61
+ <!DOCTYPE html>
62
+ <html>
63
+ <head><title>SRE Incident Response β€” OpenEnv</title></head>
64
+ <body style="font-family:sans-serif;max-width:600px;margin:40px auto;padding:20px">
65
+ <h1>🚨 SRE Incident Response β€” OpenEnv</h1>
66
+ <p>Status: <strong style="color:green">Running</strong></p>
67
+ <p>An OpenEnv environment for training AI agents on SRE incident response tasks.</p>
68
+ <ul>
69
+ <li><a href="/health">/health</a> β€” Health check</li>
70
+ <li><a href="/tasks">/tasks</a> β€” All tasks</li>
71
+ <li><a href="/docs">/docs</a> β€” Interactive API docs</li>
72
+ </ul>
73
+ <p><em>3 tasks: alert_classification (easy), root_cause_analysis (medium), remediation_planning (hard)</em></p>
74
+ </body>
75
+ </html>
76
+ """
77
 
78
 
79
  # ── Core OpenEnv endpoints ───────────────────────────────────────────────────