Spaces:
Sleeping
Sleeping
nltk download cancel
Browse files
app.py
CHANGED
@@ -14,9 +14,11 @@ from nltk.stem import WordNetLemmatizer
|
|
14 |
|
15 |
# nltk.download('punkt')
|
16 |
# nltk.download('wordnet')
|
17 |
-
# Ensure NLTK data is downloaded
|
18 |
-
nltk.download('punkt', download_dir=Path('/app/nltk_data'))
|
19 |
-
nltk.download('wordnet', download_dir=Path('/app/nltk_data'))
|
|
|
|
|
20 |
|
21 |
app = Flask(__name__)
|
22 |
|
|
|
14 |
|
15 |
# nltk.download('punkt')
|
16 |
# nltk.download('wordnet')
|
17 |
+
# # Ensure NLTK data is downloaded
|
18 |
+
# nltk.download('punkt', download_dir=Path('/app/nltk_data'))
|
19 |
+
# nltk.download('wordnet', download_dir=Path('/app/nltk_data'))
|
20 |
+
# Ensure NLTK uses the correct data path
|
21 |
+
nltk.data.path.append(os.getenv('NLTK_DATA'))
|
22 |
|
23 |
app = Flask(__name__)
|
24 |
|