From 14a65026e7812ef43c1e960b4cb81c778f25efd6 Mon Sep 17 00:00:00 2001 From: Diego Morientez Date: Fri, 23 Aug 2024 12:49:29 -0600 Subject: [PATCH] Update transformer.py Adding **kwargs, in order to work with proxy configuration. --- flair/embeddings/transformer.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flair/embeddings/transformer.py b/flair/embeddings/transformer.py index d4bf356122..f3492178f9 100644 --- a/flair/embeddings/transformer.py +++ b/flair/embeddings/transformer.py @@ -1073,7 +1073,7 @@ def __init__( model, add_prefix_space=True, **transformers_tokenizer_kwargs, **kwargs ) try: - self.feature_extractor = AutoFeatureExtractor.from_pretrained(model, apply_ocr=False) + self.feature_extractor = AutoFeatureExtractor.from_pretrained(model, apply_ocr=False, **kwargs) except OSError: self.feature_extractor = None else: