Resetted some options to default, removed EasyOCR model wrap.

Signed-off-by: ahn <ahn@zurich.ibm.com>
This commit is contained in:
ahn 2025-02-17 09:48:00 +01:00
parent 0bca78a84b
commit a8d1cdfaa5
2 changed files with 4 additions and 5 deletions

View File

@ -55,7 +55,6 @@ class EasyOcrModel(BaseOcrModel):
for x in [
AcceleratorDevice.CUDA.value,
AcceleratorDevice.MPS.value,
"cuda:",
]
]
)

View File

@ -30,8 +30,8 @@ def main():
# num_threads=8, device=AcceleratorDevice.CUDA
# )
# easyocr doesnt support cuda:N allocation
# accelerator_options = AcceleratorOptions(num_threads=8, device="cuda:0")
# easyocr doesnt support cuda:N allocation, defaults to cuda:0
# accelerator_options = AcceleratorOptions(num_threads=8, device="cuda:1")
pipeline_options = PdfPipelineOptions()
pipeline_options.accelerator_options = accelerator_options
@ -57,8 +57,8 @@ def main():
# List with total time per document
doc_conversion_secs = conversion_result.timings["pipeline_total"].times
# md = doc.export_to_markdown()
# print(md)
md = doc.export_to_markdown()
print(md)
print(f"Conversion secs: {doc_conversion_secs}")