File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -585,6 +585,9 @@ def remove(name: str) -> bool:
585585 # FileNotFoundError: [Errno 2] No such file or directory:
586586 # '/usr/local/lib/python3.6/dist-packages/pythainlp/corpus/ttc'
587587 """
588+ if _CHECK_MODE == "1" :
589+ print ("PyThaiNLP is read-only mode. It can't download." )
590+ return False
588591 with open (corpus_db_path (), "r" , encoding = "utf-8-sig" ) as f :
589592 db = json .load (f )
590593 data = [
@@ -642,9 +645,6 @@ def get_hf_hub(repo_id:str, filename: str=None) -> str:
642645 :return: path
643646 :rtype: str
644647 """
645- if _CHECK_MODE == "1" :
646- print ("PyThaiNLP is read-only mode. It can't download." )
647- return False
648648 try :
649649 from huggingface_hub import hf_hub_download , snapshot_download
650650 except ModuleNotFoundError :
You can’t perform that action at this time.
0 commit comments