mirror of
https://github.com/explosion/spaCy.git
synced 2025-10-02 18:06:46 +03:00
Update example
This commit is contained in:
parent
68b7e3a33a
commit
47969e306b
|
@ -40,7 +40,7 @@ def main(model=None, output_dir=None, n_iter=20, n_texts=2000):
|
||||||
# Create the PyTorch neural network model, and wrap it with Thinc. This
|
# Create the PyTorch neural network model, and wrap it with Thinc. This
|
||||||
# gives it the API that spaCy expects.
|
# gives it the API that spaCy expects.
|
||||||
pt_model = create_model()
|
pt_model = create_model()
|
||||||
textcat = thinc.extra.wrappers.PytorchWrapper(pt_model)
|
textcat = thinc.extra.wrappers.PyTorchWrapper(pt_model)
|
||||||
nlp.add_pipe(textcat, last=True)
|
nlp.add_pipe(textcat, last=True)
|
||||||
|
|
||||||
# add label to text classifier
|
# add label to text classifier
|
||||||
|
|
Loading…
Reference in New Issue
Block a user