diff --git a/docling/models/smol_docling_model.py b/docling/models/smol_docling_model.py index 5e2c7db0..578699c3 100644 --- a/docling/models/smol_docling_model.py +++ b/docling/models/smol_docling_model.py @@ -81,11 +81,6 @@ class SmolDoclingModel(BasePageModel): if hi_res_image is not None: im_width, im_height = hi_res_image.size - print( - "Processed image resolution: {} x {}".format( - im_width, im_height - ) - ) # populate page_tags with predicted doc tags page_tags = "" @@ -115,7 +110,6 @@ class SmolDoclingModel(BasePageModel): ) inputs = {k: v.to(self.device) for k, v in inputs.items()} - print("In the model, starting to generate...") start_time = time.time() # Call model to generate: generated_ids = self.vlm_model.generate( @@ -138,11 +132,11 @@ class SmolDoclingModel(BasePageModel): inference_time = time.time() - start_time tokens_per_second = num_tokens / generation_time - print("") - print(f"Page Inference Time: {inference_time:.2f} seconds") - print(f"Total tokens on page: {num_tokens:.2f}") - print(f"Tokens/sec: {tokens_per_second:.2f}") - print("") + # print("") + # print(f"Page Inference Time: {inference_time:.2f} seconds") + # print(f"Total tokens on page: {num_tokens:.2f}") + # print(f"Tokens/sec: {tokens_per_second:.2f}") + # print("") page.predictions.doctags = DocTagsPrediction(tag_string=page_tags) yield page diff --git a/docling/pipeline/vlm_pipeline.py b/docling/pipeline/vlm_pipeline.py index b79ca711..ec7d05a8 100644 --- a/docling/pipeline/vlm_pipeline.py +++ b/docling/pipeline/vlm_pipeline.py @@ -334,9 +334,6 @@ class VlmPipeline(PaginatedPipeline): xml_content = "" predicted_text = "" if page.predictions.doctags: - print("Doctags predicted for a page {}:".format(pg_idx)) - print(page.predictions.doctags) - print("") predicted_text = page.predictions.doctags.tag_string image = page.image page_no = pg_idx + 1 @@ -382,9 +379,6 @@ class VlmPipeline(PaginatedPipeline): elif tag_name == "picture": text_caption_content = extract_inner_text(full_chunk) - print("----------- TEXT CONTENT OF A PICTURE TAG -------------") - print(text_caption_content) - print("-------------------------------------------------------") if image: if bbox: width, height = image.size