Skip to content

Commit 45af404

Browse files
fix display & test
1 parent 6c97e7a commit 45af404

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

mindee/v2/parsing/inference/utilities/split/split_result.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,8 @@ def __init__(self, raw_response: StringDict) -> None:
1313
self.split = [SplitSplit(split) for split in raw_response["split"]]
1414

1515
def __str__(self) -> str:
16-
out_str = f"Splits\n======{self.split}"
16+
splits = "\n"
17+
if len(self.split) > 0:
18+
splits += "\n\n".join([str(split) for split in self.split])
19+
out_str = f"Splits\n======{splits}"
1720
return out_str

mindee/v2/parsing/inference/utilities/split/split_split.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,4 @@ def __init__(self, server_response: StringDict):
1717

1818
def __str__(self) -> str:
1919
page_range = ",".join([str(page_index) for page_index in self.page_range])
20-
return f":Page Range: {page_range}\n:Document Type: {self.document_type}"
20+
return f"* :Page Range: {page_range}\n :Document Type: {self.document_type}"

tests/v2/parsing/test_split_integration.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
@pytest.fixture(scope="session")
1212
def split_model_id() -> str:
1313
"""Identifier of the Financial Document model, supplied through an env var."""
14-
return os.getenv("MINDEE_V2_SE_TESTS_SPLIT_MODEL_ID")
14+
return os.getenv("MINDEE_V2_SPLIT_UTILITY_MODEL_ID")
1515

1616

1717
@pytest.fixture(scope="session")

0 commit comments

Comments
 (0)