mirror of
https://github.com/explosion/spaCy.git
synced 2025-08-05 04:40:20 +03:00
dont quit but warn
This commit is contained in:
parent
c425ad1443
commit
453dde899d
|
@ -117,8 +117,10 @@ def apply(
|
|||
docbin = DocBin(store_user_data=True)
|
||||
paths = walk_directory(data_path)
|
||||
if len(paths) == 0:
|
||||
msg.fail("Did not find data to process,"
|
||||
f" {data_path} seems to be an empty directory.", exits=1)
|
||||
docbin.to_disk(output_file)
|
||||
msg.warn("Did not find data to process,"
|
||||
f" {data_path} seems to be an empty directory.")
|
||||
return
|
||||
nlp = load_model(model)
|
||||
msg.good(f"Loaded model {model}")
|
||||
vocab = nlp.vocab
|
||||
|
|
Loading…
Reference in New Issue
Block a user