Spaces:
Sleeping
Sleeping
apidocs added
Browse files
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():
|