Spaces:
No application file
No application file
Update app.py
Browse files
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("============================================")
|