mirror of
https://github.com/huggingface/transformers.git
synced 2025-07-23 14:29:01 +06:00
fix nltk lookup (#10585)
This commit is contained in:
parent
9dd054fba2
commit
e6ce636e02
@ -52,7 +52,7 @@ logger = logging.getLogger(__name__)
|
||||
|
||||
try:
|
||||
nltk.data.find("tokenizers/punkt")
|
||||
except LookupError:
|
||||
except (LookupError, OSError):
|
||||
if is_offline_mode():
|
||||
raise LookupError(
|
||||
"Offline mode: run this script without TRANSFORMERS_OFFLINE first to download nltk data files"
|
||||
|
Loading…
Reference in New Issue
Block a user