Skip to content

How to not reach out to internet when loading model #27

@demongolem-biz2

Description

@demongolem-biz2

I do
pip install spacy-universal-sentence-encoder

then in code:

import spacy_universal_sentence_encoder
# load one of the models: ['en_use_md', 'en_use_lg', 'xx_use_md', 'xx_use_lg']
nlp = spacy_universal_sentence_encoder.load_model('en_use_md')

But at that load_model line, the code tries to go out to the internet. I see in the stack trace lin 261 in language.py which is

self.model = hub.load(self.model_url)

Is there a way to prevent this loading from a url and just load the model locally?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions