Skip to content

Commit

Permalink
Update worker.py
Browse files Browse the repository at this point in the history
Added model version config
  • Loading branch information
DrRSatzteil authored Jan 6, 2024
1 parent 641ccc0 commit 05f0bb6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion mayanmindee/worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -245,14 +245,15 @@ def process_custom(document_id: int, document_type: str, synchronous: False) ->

account_name = apis[document_type]["account"]
endpoint_name = apis[document_type]["endpoint"]
model_version = apis[document_type]["model"]

m = get_mayan()
document, pdf_bytes = load_document(m, document_id)

file = cut_pages(pdf_bytes, pagelimit=apis[document_type]["pagelimit"])

parsed_doc = ocr_custom(
file, str(document_id) + ".pdf", account_name, endpoint_name, synchronous
file, str(document_id) + ".pdf", account_name, endpoint_name, model_version, synchronous
)

if "storeocr" in apis[document_type]:
Expand Down

0 comments on commit 05f0bb6

Please sign in to comment.