Skip to content

Commit

Permalink
Correctness: call from_hf_hub on type, not instance
Browse files Browse the repository at this point in the history
  • Loading branch information
danieldk committed Apr 8, 2024
1 parent dd8a05b commit 14b0814
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion spacy_curated_transformers/models/hf_loader.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def load(model, X=None, Y=None):
encoder = model.shims[0]._model
assert isinstance(encoder, FromHFHub)
device = model.shims[0].device
from_hf_hub = encoder.from_hf_hub
from_hf_hub = type(encoder).from_hf_hub

# We can discard the previously initialized model entirely
# and use the Curated Transformers API to load it from the
Expand Down

0 comments on commit 14b0814

Please sign in to comment.