Skip to content

Commit

Permalink
mindeeapi.py aktualisieren
Browse files Browse the repository at this point in the history
More api changes
  • Loading branch information
DrRSatzteil authored Jan 5, 2024
1 parent f204b89 commit 6b7d442
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions mayanmindee/mindeeapi.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@

def ocr_standard(pdf_bytes, document_name, document_type):
client = Client(api_key=os.getenv("MINDEE_API_KEY"))
doc = client.doc_from_bytes(pdf_bytes, document_name)
parsed_doc = doc.parse(getattr(product, document_type))
doc = client.source_from_bytes(pdf_bytes, document_name)
parsed_doc = client.parse(getattr(product, document_type), doc)
return parsed_doc


Expand All @@ -17,6 +17,6 @@ def ocr_custom(pdf_bytes, document_name, account_name, endpoint_name):
account_name=account_name,
endpoint_name=endpoint_name,
)
doc = client.doc_from_bytes(pdf_bytes, document_name)
doc = client.source_from_bytes(pdf_bytes, document_name)
parsed_doc = doc.parse(product.TypeCustomV1, endpoint_name=endpoint_name)
return parsed_doc

0 comments on commit 6b7d442

Please sign in to comment.