File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 4545
4646from .misc import (doc_loaders_cache , html_to_text , hasher ,
4747 file_hasher , get_splitter , check_docs_tkn_length ,
48- average_word_length , wpm )
48+ average_word_length , wpm , global_temp_dir )
4949from .typechecker import optional_typecheck
5050from .logger import whi , yel , red , log
5151from .flags import is_verbose , is_linux
@@ -173,8 +173,6 @@ def load(self):
173173 ["norm" ],
174174]
175175
176- global_temp_dir = [None ] # will be replaced when load_one_doc is called
177-
178176
179177@optional_typecheck
180178def load_one_doc (
Original file line number Diff line number Diff line change 3131TextSplitter = lazy_import .lazy_class ('langchain.text_splitter.TextSplitter' )
3232RecursiveCharacterTextSplitter = lazy_import .lazy_class ('langchain.text_splitter.RecursiveCharacterTextSplitter' )
3333
34+ # will be replaced when load_one_doc is called, by the path to the file where the loaders can store temporary file
35+ global_temp_dir = [None ]
36+
3437try :
3538 import ftlangdetect
3639except Exception as err :
You can’t perform that action at this time.
0 commit comments