Verifier-Service / main.py
ArabicNewsAnalyzer's picture
Upload 17 files
51d2734 verified
Raw
History Blame Contribute Delete
538 Bytes
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"}