mirror of
https://github.com/DS4SD/docling.git
synced 2025-07-30 22:14:37 +00:00
fix: allow mps usage for easyocr
Signed-off-by: Michele Dolfi <dol@zurich.ibm.com>
This commit is contained in:
parent
be8aa17291
commit
5f07114fd9
@ -31,12 +31,9 @@ class EasyOcrModel(BaseOcrModel):
|
||||
"Alternatively, Docling has support for other OCR engines. See the documentation."
|
||||
)
|
||||
|
||||
use_gpu = (
|
||||
False if torch.backends.mps.is_available() else self.options.use_gpu
|
||||
)
|
||||
self.reader = easyocr.Reader(
|
||||
lang_list=self.options.lang,
|
||||
gpu=use_gpu,
|
||||
gpu=self.options.use_gpu,
|
||||
model_storage_directory=self.options.model_storage_directory,
|
||||
download_enabled=self.options.download_enabled,
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user