AzizTh commited on
Commit
5aa6ce6
1 Parent(s): da29c4d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -5
app.py CHANGED
@@ -7,13 +7,13 @@ import subprocess
7
 
8
  # Run the spacy model download command
9
 
10
- try:
11
  # Try to load the model to check if it's already installed
12
- nlp = spacy.load("en_core_web_trf")
13
- except OSError:
14
  # If the model is not found, download it
15
- subprocess.run(["python", "-m", "spacy", "download", "en_core_web_trf"])
16
- nlp = spacy.load("en_core_web_trf")
17
 
18
  model = SentenceTransformer("nomic-ai/nomic-embed-text-v1", trust_remote_code=True)
19
 
 
7
 
8
  # Run the spacy model download command
9
 
10
+ # try:
11
  # Try to load the model to check if it's already installed
12
+ # nlp = spacy.load("en_core_web_trf")
13
+ # except OSError:
14
  # If the model is not found, download it
15
+ subprocess.run(["python", "-m", "spacy", "download", "en_core_web_trf"])
16
+ nlp = spacy.load("en_core_web_trf")
17
 
18
  model = SentenceTransformer("nomic-ai/nomic-embed-text-v1", trust_remote_code=True)
19