mirror of
https://github.com/DS4SD/docling.git
synced 2025-08-01 15:02:21 +00:00
Resetted some options to default, removed EasyOCR model wrap.
Signed-off-by: ahn <ahn@zurich.ibm.com>
This commit is contained in:
parent
0bca78a84b
commit
a8d1cdfaa5
@ -55,7 +55,6 @@ class EasyOcrModel(BaseOcrModel):
|
|||||||
for x in [
|
for x in [
|
||||||
AcceleratorDevice.CUDA.value,
|
AcceleratorDevice.CUDA.value,
|
||||||
AcceleratorDevice.MPS.value,
|
AcceleratorDevice.MPS.value,
|
||||||
"cuda:",
|
|
||||||
]
|
]
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
|
@ -30,8 +30,8 @@ def main():
|
|||||||
# num_threads=8, device=AcceleratorDevice.CUDA
|
# num_threads=8, device=AcceleratorDevice.CUDA
|
||||||
# )
|
# )
|
||||||
|
|
||||||
# easyocr doesnt support cuda:N allocation
|
# easyocr doesnt support cuda:N allocation, defaults to cuda:0
|
||||||
# accelerator_options = AcceleratorOptions(num_threads=8, device="cuda:0")
|
# accelerator_options = AcceleratorOptions(num_threads=8, device="cuda:1")
|
||||||
|
|
||||||
pipeline_options = PdfPipelineOptions()
|
pipeline_options = PdfPipelineOptions()
|
||||||
pipeline_options.accelerator_options = accelerator_options
|
pipeline_options.accelerator_options = accelerator_options
|
||||||
@ -57,8 +57,8 @@ def main():
|
|||||||
# List with total time per document
|
# List with total time per document
|
||||||
doc_conversion_secs = conversion_result.timings["pipeline_total"].times
|
doc_conversion_secs = conversion_result.timings["pipeline_total"].times
|
||||||
|
|
||||||
# md = doc.export_to_markdown()
|
md = doc.export_to_markdown()
|
||||||
# print(md)
|
print(md)
|
||||||
print(f"Conversion secs: {doc_conversion_secs}")
|
print(f"Conversion secs: {doc_conversion_secs}")
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user