File size: 538 Bytes
e2870fc f89a3d6 e2870fc f89a3d6 e2870fc f89a3d6 e2870fc | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | from fastapi import FastAPI, HTTPException
from graph.langgraph_pipeline import run_pipeline
from schemas import VerifyRequest, VerifyResponse
app = FastAPI(title="Arabic Verifier Service")
@app.post("/verify", response_model=VerifyResponse)
async def verify(req: VerifyRequest):
try:
result = await run_pipeline(req.text)
return result
except Exception as e:
raise HTTPException(status_code=500, detail=str(e))
@app.get("/health")
async def health():
return {"status": "ok"}
|