Skip to content

Commit 0571a44

Browse files
committed
fix: With the newer version of transformers 4.57.1, the type checking became stricter, and mypy correctly flagged that DetrImageProcessor.from_pretrained() expects str | PathLike[Any], not a model object.
1 parent 03115f6 commit 0571a44

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

unstructured_inference/models/tables.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ def predict(
6767

6868
def initialize(
6969
self,
70-
model: Union[str, Path, TableTransformerForObjectDetection],
70+
model: Union[str, Path],
7171
device: Optional[str] = "cuda" if torch.cuda.is_available() else "cpu",
7272
):
7373
"""Loads the donut model using the specified parameters"""

0 commit comments

Comments
 (0)