Skip to content

Commit

Permalink
health check
Browse files Browse the repository at this point in the history
  • Loading branch information
j2whiting committed Sep 11, 2024
1 parent 8c4789e commit c76afcd
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions document_intelligence/fast_latex/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,10 @@ async def process_and_predict(file: UploadFile = File(...), isolated_only: bool

return JSONResponse(content=latex_results)

@app.get("/health")
async def health_check():
return JSONResponse(content={"status": "OK"}, status_code=200)

if __name__ == "__main__":
import uvicorn
uvicorn.run(app, host="0.0.0.0", port=8002)
4 changes: 4 additions & 0 deletions document_intelligence/nougat/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,10 @@ async def process_pdf(file: UploadFile = File(...)):

return JSONResponse(content=latex_dict)

@app.get("/health")
async def health_check():
return JSONResponse(content={"status": "OK"}, status_code=200)

if __name__ == "__main__":
import uvicorn
uvicorn.run(app, host="0.0.0.0", port=8000)

0 comments on commit c76afcd

Please sign in to comment.