from spacy.cli.train import train as spacy_train

#Trains model using formatted data from make_docs() function

#Loads data trained in textcat.py
#Trains model, saved in /output
config_path = "./config.cfg"
output_model_path = "output/spacy_textcat"
spacy_train(
    config_path,
    output_path= output_model_path,
    overrides={
        "paths.train": "data/train.spacy",
        "paths.dev": "data/valid.spacy"
    }
)