Mpavan45 commited on
Commit
16212fc
·
verified ·
1 Parent(s): b0a4e3e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
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 ['punkt', 'stopwords', 'wordnet']:
193
  try:
194
- nltk.data.find(f'tokenizers/{resource}' if resource == 'punkt' else f'corpora/{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