File size: 885 Bytes
8983805
 
bc35722
 
 
9b9a7e2
bc35722
 
 
 
 
 
 
 
 
 
77b9e4d
fdede90
 
 
77b9e4d
fdede90
77b9e4d
 
 
fdede90
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# api/routes/static.py

from fastapi import APIRouter, HTTPException
from fastapi.responses import HTMLResponse

router = APIRouter(tags=["Static"])

@router.get("/", response_class=HTMLResponse)
async def get_medical_chatbot():
	"""Serve the medical chatbot UI"""
	try:
		with open("static/index.html", "r", encoding="utf-8") as f:
			html_content = f.read()
		return HTMLResponse(content=html_content)
	except FileNotFoundError:
		raise HTTPException(status_code=404, detail="Medical chatbot UI not found")

@router.get("/system-status", response_class=HTMLResponse)
async def get_system_status():
	"""Serve the unified system status UI"""
	try:
		with open("static/system.html", "r", encoding="utf-8") as f:
			html_content = f.read()
		return HTMLResponse(content=html_content)
	except FileNotFoundError:
		raise HTTPException(status_code=404, detail="System status UI not found")