Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -6,7 +6,12 @@ from syngen_diffusion_pipeline import SynGenDiffusionPipeline
|
|
6 |
import subprocess
|
7 |
|
8 |
def install_spacy_model(model_name):
|
9 |
-
|
|
|
|
|
|
|
|
|
|
|
10 |
install_spacy_model("en_core_web_trf")
|
11 |
|
12 |
model_path = 'CompVis/stable-diffusion-v1-4'
|
|
|
6 |
import subprocess
|
7 |
|
8 |
def install_spacy_model(model_name):
|
9 |
+
try:
|
10 |
+
subprocess.check_call(["python", "-m", "spacy", "download", model_name])
|
11 |
+
except subprocess.CalledProcessError as e:
|
12 |
+
print(f"Error occurred while installing the model: {model_name}")
|
13 |
+
print(f"Error details: {str(e)}")
|
14 |
+
|
15 |
install_spacy_model("en_core_web_trf")
|
16 |
|
17 |
model_path = 'CompVis/stable-diffusion-v1-4'
|