longjava2024 commited on
Commit
685a70e
·
verified ·
1 Parent(s): 9ca4c72

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +13 -0
app.py CHANGED
@@ -257,3 +257,16 @@ def ocr_endpoint(req: OCRRequest):
257
  return {"response_message": parsed}
258
  except Exception as e:
259
  raise HTTPException(status_code=500, detail=str(e))
 
 
 
 
 
 
 
 
 
 
 
 
 
 
257
  return {"response_message": parsed}
258
  except Exception as e:
259
  raise HTTPException(status_code=500, detail=str(e))
260
+
261
+
262
+ @app.on_event("startup")
263
+ async def startup_log():
264
+ """
265
+ Log basic information about available endpoints when the app starts.
266
+ """
267
+ print("============================================")
268
+ print("CCCD OCR API is running")
269
+ print("Main endpoint: POST /ocr")
270
+ print("Docs (Swagger): GET /docs")
271
+ print("Redoc: GET /redoc")
272
+ print("============================================")