-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapp.py
More file actions
38 lines (27 loc) · 846 Bytes
/
Copy pathapp.py
File metadata and controls
38 lines (27 loc) · 846 Bytes
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
28
29
30
31
32
33
34
35
36
37
38
"""Sequence-to-Function FastAPI application."""
import os
from fastapi import FastAPI
from fastapi.responses import FileResponse
from app_startup.lifespan import lifespan
from api.stf.router import router as stf_router
# Create FastAPI app with lifespan management
app = FastAPI(lifespan=lifespan)
app.include_router(stf_router)
@app.get("/")
async def serve_chat_ui():
"""Serve the chat UI interface."""
return FileResponse("chat_ui.html")
@app.get("/health")
async def health_check():
"""Health check endpoint."""
return {"status": "healthy"}
if __name__ == "__main__":
import uvicorn
from app_startup.lifespan import configure_logging
configure_logging()
uvicorn.run(
app,
host=os.getenv("HOST", "0.0.0.0"),
port=int(os.getenv("PORT", "8080")),
use_colors=True,
)