Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How can export and use the trained model ? #8

Open
asriabdelhakim opened this issue Mar 24, 2019 · 5 comments
Open

How can export and use the trained model ? #8

asriabdelhakim opened this issue Mar 24, 2019 · 5 comments

Comments

@asriabdelhakim
Copy link

Hello;
I just trained my model with my data, so i want to export my model and use it back later with data.
Thank you :)

@drishyamlabs
Copy link

Hi @mrfast7,
You can do that by using the following two commands:

nlp.to_disk('my_model')
nlp1 = spacy.load('my_model')

All model related files get stored in this directory 'my_model'.

@asriabdelhakim
Copy link
Author

asriabdelhakim commented Apr 25, 2019 via email

@Abhimanyu100
Copy link

@mrfast7 I think this repo will help https://github.com/ManivannanMurugavel/spacy-ner-annotator

@Abhimanyu100
Copy link

@saahilgupta93 I am using your two line code to save my NER Spacy model it's throwing this error Namerror: name 'nlp' is not defined Here is my code. https://pastebin.com/ySVTSLMG

@sayalraza
Copy link

Hi @mrfast7,
You can do that by using the following two commands:

nlp.to_disk('my_model')
nlp1 = spacy.load('my_model')

All model related files get stored in this directory 'my_model'.

@saahilgupta93 I am using this but getting wrong results after saving and loading model. But when I use the trained model directly, I am getting correct results. Any idea why?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants