devve1 commited on
Commit
04e3514
1 Parent(s): b605162

Update storage.py

Browse files
Files changed (1) hide show
  1. storage.py +2 -8
storage.py CHANGED
@@ -1,12 +1,6 @@
1
  import File
2
 
3
  class LocalFileStore:
4
- def __init__(self, file_type, base_path, name):
5
- self.embeddings_path = os.path.join(base_path, 'embeddings')
6
- self.chunks_path = file_type(os.path.join(self.embeddings_path, f'{name}_chunks.msgpack'))
7
- self.dense_path = NumpyFile(os.path.join(self.embeddings_path, f'{name}_dense.npz'))
8
- self.sparse_path = SparseFile(os.path.join(self.embeddings_path, f'{name}_sparse.npz'))
9
-
10
- if not os.path.exists(self.embeddings_path):
11
- os.makedirs(self.embeddings_path)
12
 
 
1
  import File
2
 
3
  class LocalFileStore:
4
+ def __init__(self, file_type: File, path, name: str):
5
+ self.file_path = os.path.join(self.path, f'{name}_{file_type.get_file_name()}.{file_type.get_extension()}')
 
 
 
 
 
 
6