Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -189,9 +189,9 @@ if not os.path.exists(nltk_data_path):
|
|
| 189 |
os.makedirs(nltk_data_path)
|
| 190 |
|
| 191 |
# Download NLTK resources only if not already present
|
| 192 |
-
for resource in ['
|
| 193 |
try:
|
| 194 |
-
nltk.data.find(f'tokenizers/{resource}' if resource == '
|
| 195 |
except LookupError:
|
| 196 |
nltk.download(resource, download_dir=nltk_data_path)
|
| 197 |
|
|
|
|
| 189 |
os.makedirs(nltk_data_path)
|
| 190 |
|
| 191 |
# Download NLTK resources only if not already present
|
| 192 |
+
for resource in ['punkt_tab', 'stopwords', 'wordnet']:
|
| 193 |
try:
|
| 194 |
+
nltk.data.find(f'tokenizers/{resource}' if resource == 'punkt_tab' else f'corpora/{resource}')
|
| 195 |
except LookupError:
|
| 196 |
nltk.download(resource, download_dir=nltk_data_path)
|
| 197 |
|