Skip to content

ultima thule

Pre-release
Pre-release
Compare
Choose a tag to compare
@xf0e xf0e released this 18 Dec 03:33
  • This release contains mostly the CGL and a workaround to prevent memory leakage in workers.
  • For tesseract engine there is a new parameter deferred with true|false values. Sandwich engine may work too.

To test the new feature:

  1. 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":""}
  2. 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.