data-science-document-ai 1.43.3__py3-none-any.whl → 1.43.4__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: data-science-document-ai
3
- Version: 1.43.3
3
+ Version: 1.43.4
4
4
  Summary: "Document AI repo for data science"
5
5
  Author: Naomi Nguyen
6
6
  Author-email: naomi.nguyen@forto.com
@@ -2,7 +2,7 @@ src/constants.py,sha256=rpYIecVLIBLh98YrJ8e5gdvM0bqrXJZWIKgFkUSn69g,3513
2
2
  src/constants_sandbox.py,sha256=Iu6HdjCoNSmOX0AwoL9qUQkhq_ZnIN5U9e-Q2UfNuGc,547
3
3
  src/docai.py,sha256=dHuR0ehVjUi1CnoNvdp_yxJtpU_HFXqAZ61ywdz7BEo,5655
4
4
  src/docai_processor_config.yaml,sha256=81NUGs-u8UFJm6mc0ZOeeNQlhe9h0f35GhjTcwErvTA,1717
5
- src/excel_processing.py,sha256=gzP7QFCp4-n0FTevhWmXm-2UoDF0w0y5v39gsby0IV8,3135
5
+ src/excel_processing.py,sha256=AppxrliVj7cLv1I_X7xC5bq4OPFAeiVNMNwcp-TZZDs,3466
6
6
  src/io.py,sha256=tOJpMyI-mP1AaXKG4UFudH47MHWzjWBgVahFJUcjGfs,4749
7
7
  src/llm.py,sha256=OE4IEIqcM-hYK9U7e0x1rAfcqdpeo4iXPHBp64L5Qz0,8199
8
8
  src/log_setup.py,sha256=RhHnpXqcl-ii4EJzRt47CF2R-Q3YPF68tepg_Kg7tkw,2895
@@ -54,6 +54,6 @@ src/prompts/prompt_library.py,sha256=jPxybNPPGH7mzonqtAOqmw5WcT-RtbGP0pvMqqP22hg
54
54
  src/setup.py,sha256=M-p5c8M9ejKcSZ9N86VtmtPc4TYLxe1_4_dxf6jpfVc,7262
55
55
  src/tms.py,sha256=UXbIo1QE--hIX6NZi5Qyp2R_CP338syrY9pCTPrfgnE,1741
56
56
  src/utils.py,sha256=cTF2A12jugKjXxGlNXEZQtfgcsIoaTtaU7zhVOOvXXA,16634
57
- data_science_document_ai-1.43.3.dist-info/METADATA,sha256=6WQCGhLAMXOWEdTyPax7z0teZpgl-poGtI3o3X_P164,2152
58
- data_science_document_ai-1.43.3.dist-info/WHEEL,sha256=zp0Cn7JsFoX2ATtOhtaFYIiE2rmFAD4OcMhtUki8W3U,88
59
- data_science_document_ai-1.43.3.dist-info/RECORD,,
57
+ data_science_document_ai-1.43.4.dist-info/METADATA,sha256=bcmTXEnl4r0z7IqelSFuCyfxNJjnPvEY2snX1WViH9s,2152
58
+ data_science_document_ai-1.43.4.dist-info/WHEEL,sha256=zp0Cn7JsFoX2ATtOhtaFYIiE2rmFAD4OcMhtUki8W3U,88
59
+ data_science_document_ai-1.43.4.dist-info/RECORD,,
src/excel_processing.py CHANGED
@@ -9,12 +9,12 @@ from src.postprocessing.common import llm_prediction_to_tuples
9
9
  logger = logging.getLogger(__name__)
10
10
 
11
11
  import asyncio
12
- import json
13
12
 
14
13
  import numpy as np
15
14
  import pandas as pd
16
15
 
17
16
  from src.llm import prompt_excel_extraction
17
+ from src.prompts.prompt_library import prompt_library
18
18
  from src.utils import estimate_page_count, generate_schema_structure, get_excel_sheets
19
19
 
20
20
 
@@ -67,7 +67,18 @@ async def extract_data_from_excel(
67
67
 
68
68
  """
69
69
  # Generate the response structure
70
- response_schema = generate_schema_structure(params, input_doc_type)
70
+ response_schema = (
71
+ prompt_library.library[input_doc_type]["other"]["placeholders"]
72
+ if input_doc_type
73
+ in [
74
+ "partnerInvoice",
75
+ "customsInvoice",
76
+ "bundeskasse",
77
+ "commercialInvoice",
78
+ "packingList",
79
+ ]
80
+ else generate_schema_structure(params, input_doc_type)
81
+ )
71
82
 
72
83
  # Load the Excel file and get ONLY the "visible" sheet names
73
84
  sheets, workbook = get_excel_sheets(file_content, mime_type)