priyadip commited on
Commit
22d72ea
·
verified ·
1 Parent(s): 6f7b071

Fix OSError in NLTK check and use HistGradientBoostingClassifier

Browse files
Files changed (1) hide show
  1. utils/preprocessing.py +1 -1
utils/preprocessing.py CHANGED
@@ -11,7 +11,7 @@ from typing import List, Optional
11
  # Download required NLTK data (handled gracefully for HF Spaces)
12
  try:
13
  nltk.data.find("tokenizers/punkt_tab")
14
- except LookupError:
15
  nltk.download("punkt_tab", quiet=True)
16
  try:
17
  nltk.data.find("corpora/stopwords")
 
11
  # Download required NLTK data (handled gracefully for HF Spaces)
12
  try:
13
  nltk.data.find("tokenizers/punkt_tab")
14
+ except (LookupError, OSError):
15
  nltk.download("punkt_tab", quiet=True)
16
  try:
17
  nltk.data.find("corpora/stopwords")