mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-08 20:42:30 +08:00
Updates on parsing progress, including more detailed time cost inform… (#3402)
### What problem does this PR solve? #3401 ### Type of change - [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
@ -32,7 +32,18 @@ def python_version_validation():
|
||||
|
||||
python_version_validation()
|
||||
|
||||
|
||||
# Download nltk data
|
||||
import nltk
|
||||
nltk.download('wordnet', halt_on_error=False, quiet=True)
|
||||
nltk.download('punkt_tab', halt_on_error=False, quiet=True)
|
||||
def download_nltk_data():
|
||||
import nltk
|
||||
nltk.download('wordnet', halt_on_error=False, quiet=True)
|
||||
nltk.download('punkt_tab', halt_on_error=False, quiet=True)
|
||||
|
||||
|
||||
try:
|
||||
from multiprocessing import Pool
|
||||
pool = Pool(processes=1)
|
||||
thr = pool.apply_async(download_nltk_data)
|
||||
binary = thr.get(timeout=60)
|
||||
except Exception as e:
|
||||
print('\x1b[6;37;41m WARNING \x1b[0m' + "Downloading NLTK data failure.", flush=True)
|
||||
|
||||
Reference in New Issue
Block a user