Spaces:
Sleeping
Sleeping
Commit
·
954e372
1
Parent(s):
a5e428f
update scripts
Browse files
src/backend/model_operations.py
CHANGED
@@ -35,7 +35,7 @@ import spacy_transformers
|
|
35 |
import subprocess
|
36 |
|
37 |
# Run the command to download the spaCy model
|
38 |
-
subprocess.run(["python", "-m", "spacy", "download", "
|
39 |
# subprocess.run(["python", "-m", "spacy", "download", "en_core_web_sm"], check=True)
|
40 |
# subprocess.run(["pip", "install", "spacy-transformers"], check=True)
|
41 |
# subprocess.run(["pip", "install", "curated-transformers"], check=True)
|
@@ -43,7 +43,7 @@ subprocess.run(["python", "-m", "spacy", "download", "en_core_web_trf"], check=T
|
|
43 |
# Load spacy model for word tokenization
|
44 |
# nlp = spacy.load("en_core_web_sm")
|
45 |
try:
|
46 |
-
nlp1 = spacy.load("
|
47 |
except OSError:
|
48 |
print("无法加载模型,继续执行其他处理。")
|
49 |
|
|
|
35 |
import subprocess
|
36 |
|
37 |
# Run the command to download the spaCy model
|
38 |
+
subprocess.run(["python", "-m", "spacy", "download", "en_core_web_lg"], check=True)
|
39 |
# subprocess.run(["python", "-m", "spacy", "download", "en_core_web_sm"], check=True)
|
40 |
# subprocess.run(["pip", "install", "spacy-transformers"], check=True)
|
41 |
# subprocess.run(["pip", "install", "curated-transformers"], check=True)
|
|
|
43 |
# Load spacy model for word tokenization
|
44 |
# nlp = spacy.load("en_core_web_sm")
|
45 |
try:
|
46 |
+
nlp1 = spacy.load("en_core_web_lg")
|
47 |
except OSError:
|
48 |
print("无法加载模型,继续执行其他处理。")
|
49 |
|