Skip to content

Commit

Permalink
Merge pull request #124 from snexus/fix-image-parsing
Browse files Browse the repository at this point in the history
Fix condition when no tables are present in Azure table parser
  • Loading branch information
snexus authored Nov 6, 2024
2 parents 8a14ab3 + 60d3e28 commit 0f162ba
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/llmsearch/parsers/tables/azuredocint_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,9 @@ def __init__(self, fn: Path, cache_folder: Path):
def detect_and_parse_tables(self) -> List[AzureParsedTable]:
tables = self.table_pages_extractor.extract_table_pages()

if not tables:
return []

with ThreadPoolExecutor(max_workers=min(10, len(tables))) as executor:
future_to_fn = {
executor.submit(self._analyze_document, fn, page_mapping): (
Expand Down

0 comments on commit 0f162ba

Please sign in to comment.