Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -10,6 +10,17 @@ import dateparser
|
|
10 |
from datetime import datetime
|
11 |
import os
|
12 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13 |
# Load SpaCy model for dependency parsing
|
14 |
nlp_spacy = spacy.load('en_core_web_sm')
|
15 |
|
|
|
10 |
from datetime import datetime
|
11 |
import os
|
12 |
|
13 |
+
import spacy
|
14 |
+
from spacy.cli import download
|
15 |
+
from spacy.util import is_package
|
16 |
+
|
17 |
+
# Ensure the spaCy model is downloaded
|
18 |
+
if not is_package('en_core_web_sm'):
|
19 |
+
download('en_core_web_sm')
|
20 |
+
|
21 |
+
nlp_spacy = spacy.load('en_core_web_sm')
|
22 |
+
|
23 |
+
|
24 |
# Load SpaCy model for dependency parsing
|
25 |
nlp_spacy = spacy.load('en_core_web_sm')
|
26 |
|