XufengDuan commited on
Commit
1838e93
1 Parent(s): 46a7bef

update scripts

Browse files
Files changed (1) hide show
  1. src/backend/model_operations.py +4 -5
src/backend/model_operations.py CHANGED
@@ -30,21 +30,20 @@ import src.envs as envs
30
  from scipy.spatial.distance import jensenshannon
31
  from scipy.stats import bootstrap
32
  import numpy as np
33
-
34
 
35
  import subprocess
36
 
37
  # Run the command to download the spaCy model
38
  # subprocess.run(["python", "-m", "spacy", "download", "en_core_web_trf"], check=True)
39
- subprocess.run(["python", "-m", "spacy", "download", "en_core_web_trf"], check=True)
40
  # subprocess.run(["pip", "install", "spacy-transformers"], check=True)
41
- subprocess.run(["pip", "install", "spacy_transformers"], check=True)
42
- import spacy_transformers
43
 
44
  # Load spacy model for word tokenization
45
  # nlp = spacy.load("en_core_web_sm")
46
  try:
47
- nlp1 = spacy.load("en_core_web_trf")
48
  except OSError:
49
  print("无法加载模型,继续执行其他处理。")
50
 
 
30
  from scipy.spatial.distance import jensenshannon
31
  from scipy.stats import bootstrap
32
  import numpy as np
33
+ import spacy_transformers
34
 
35
  import subprocess
36
 
37
  # Run the command to download the spaCy model
38
  # subprocess.run(["python", "-m", "spacy", "download", "en_core_web_trf"], 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)
 
42
 
43
  # Load spacy model for word tokenization
44
  # nlp = spacy.load("en_core_web_sm")
45
  try:
46
+ nlp1 = spacy.load("en_core_web_sm")
47
  except OSError:
48
  print("无法加载模型,继续执行其他处理。")
49