ultima thule
Pre-release
Pre-release
- This release contains mostly the CGL and a workaround to prevent memory leakage in workers.
- For tesseract engine there is a new parameter
deferred
withtrue|false
values. Sandwich engine may work too.
To test the new feature:
curl -X POST -H "Content-Type: application/json" -d '{"img_url":"http://localhost:8000/test.tif","engine":"tesseract","deferred":true}' http://localhost:8080/ocr
There will be response like this:{"text":"ae5bffd5-27f9-4b7d-5a8b-ba62b0235f8a","status":""}
- To check the status, issue:
curl -X POST -d '{"img_url":"ae5bffd5-27f9-4b7d-5a8b-ba62b0235f8a"}' http://localhost:8080/ocr-status -H "Content-Type:application/json
by utilizing the id from the open-ocr response.
Where will be response in form of{"text":"this is the text from the image","status":""}
if the response is ready or{"text":"ae5bffd5-27f9-4b7d-5a8b-ba62b0235f8a","status":"processing"}
. Otherwise there will be 500 http code for an invalid id.