Tuchuanhuhuhu commited on
Commit
90443d4
·
1 Parent(s): 03f0627

改进文件检测准确度

Browse files
Files changed (1) hide show
  1. modules/llama_func.py +4 -2
modules/llama_func.py CHANGED
@@ -17,9 +17,11 @@ from modules.presets import *
17
  from modules.utils import *
18
 
19
  def get_index_name(file_src):
20
- index_name = ""
21
  for file in file_src:
22
- index_name += os.path.basename(file.name)
 
 
23
  index_name = sha1sum(index_name)
24
  return index_name
25
 
 
17
  from modules.utils import *
18
 
19
  def get_index_name(file_src):
20
+ index_name = []
21
  for file in file_src:
22
+ index_name.append(os.path.basename(file.name))
23
+ index_name = sorted(index_name)
24
+ index_name = "".join(index_name)
25
  index_name = sha1sum(index_name)
26
  return index_name
27