diff --git a/CHANGELOG.md b/CHANGELOG.md index 944f1b27..1db85fc8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,7 @@ -## 0.7.37-dev0 +## 0.7.37-dev1 * refactor: remove layout analysis related code +* enhancement: Hide warning about table transformer weights not being loaded ## 0.7.36 diff --git a/unstructured_inference/__version__.py b/unstructured_inference/__version__.py index 33c5779d..a55dc982 100644 --- a/unstructured_inference/__version__.py +++ b/unstructured_inference/__version__.py @@ -1 +1 @@ -__version__ = "0.7.37-dev0" # pragma: no cover +__version__ = "0.7.37-dev1" # pragma: no cover diff --git a/unstructured_inference/models/tables.py b/unstructured_inference/models/tables.py index ade5349e..c390378e 100644 --- a/unstructured_inference/models/tables.py +++ b/unstructured_inference/models/tables.py @@ -9,7 +9,7 @@ import numpy as np import torch from PIL import Image as PILImage -from transformers import DetrImageProcessor, TableTransformerForObjectDetection +from transformers import DetrImageProcessor, TableTransformerForObjectDetection, logging from transformers.models.table_transformer.modeling_table_transformer import ( TableTransformerObjectDetectionOutput, ) @@ -65,7 +65,10 @@ def initialize( try: logger.info("Loading the table structure model ...") + cached_current_verbosity = logging.get_verbosity() + logging.set_verbosity_error() self.model = TableTransformerForObjectDetection.from_pretrained(model) + logging.set_verbosity(cached_current_verbosity) self.model.eval() except EnvironmentError: