updated add_pipe docs (#12947)

This commit is contained in:
David Berenstein 2023-09-01 11:05:36 +02:00 committed by GitHub
parent 3e4264899c
commit 065ead4eed
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2806,7 +2806,7 @@
"",
"# see github repo for examples on sentence-transformers and Huggingface",
"nlp = spacy.load('en_core_web_md')",
"nlp.add_pipe(\"text_categorizer\", ",
"nlp.add_pipe(\"classy_classification\", ",
" config={",
" \"data\": data,",
" \"model\": \"spacy\"",
@ -3010,8 +3010,8 @@
"# Load the spaCy language model:",
"nlp = spacy.load(\"en_core_web_sm\")",
"",
"# Add the \"text_categorizer\" pipeline component to the spaCy model, and configure it with SetFit parameters:",
"nlp.add_pipe(\"text_categorizer\", config={",
"# Add the \"spacy_setfit\" pipeline component to the spaCy model, and configure it with SetFit parameters:",
"nlp.add_pipe(\"spacy_setfit\", config={",
" \"pretrained_model_name_or_path\": \"paraphrase-MiniLM-L3-v2\",",
" \"setfit_trainer_args\": {",
" \"train_dataset\": train_dataset",