Skip to content

Commit

Permalink
Fix condition when no tables are present in Azure table parser
Browse files Browse the repository at this point in the history
  • Loading branch information
DL committed Nov 6, 2024
1 parent 2489df2 commit 60d3e28
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 60d3e28

Please sign in to comment.