Kalpokoch commited on
Commit
f0b4428
Β·
1 Parent(s): 12b6b94

apidocs added

Browse files
Files changed (1) hide show
  1. app.py +15 -0
app.py CHANGED
@@ -36,6 +36,21 @@ async def startup_event():
36
 
37
 
38
  # ─── Routes ───────────────────────────────────────────────────────────────────
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
39
 
40
  @app.get("/health")
41
  def health():
 
36
 
37
 
38
  # ─── Routes ───────────────────────────────────────────────────────────────────
39
+ from fastapi.responses import HTMLResponse
40
+
41
+ @app.get("/", response_class=HTMLResponse)
42
+ def root():
43
+ return """
44
+ <html>
45
+ <body style="font-family:sans-serif; text-align:center; padding:40px">
46
+ <h2> CT Scan API</h2>
47
+ <p>Status: <strong style="color:green">Running</strong></p>
48
+ <p><a href="/docs">πŸ“– API Docs (Swagger)</a></p>
49
+ <p><a href="/health">❀️ Health Check</a></p>
50
+ </body>
51
+ </html>
52
+ """
53
+
54
 
55
  @app.get("/health")
56
  def health():