Commit b3bbd02
committed
fix: Use model name instead of local path for AutoProcessor.from_pretrained
Fixes AttributeError when do_formula_enrichment=True. When a local Path
is passed to AutoProcessor.from_pretrained(), transformers loads the
config as a dict but then tries to access .model_type as an attribute.
Using the model name ('docling-project/CodeFormulaV2') allows
transformers to properly load the config as an object, while still
using the cached model automatically.
Fixes #26811 parent 1344362 commit b3bbd02
1 file changed
+4
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
105 | 105 | | |
106 | 106 | | |
107 | 107 | | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
108 | 111 | | |
109 | | - | |
| 112 | + | |
110 | 113 | | |
111 | 114 | | |
112 | 115 | | |
| |||
0 commit comments