devve1 commited on
Commit
04547de
1 Parent(s): 01e9e45

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -10
app.py CHANGED
@@ -13,7 +13,6 @@ from numpy import ndarray
13
  from qdrant_client import QdrantClient, models
14
  from llama_cpp import Llama, GGML_TYPE_I8
15
  from optimum_encoder import OptimumEncoder
16
- from fastembed_encoder import FastEmbedEncoder
17
  from unstructured.partition.auto import partition
18
  from statistical_chunker import StatisticalChunker
19
  from fastembed import SparseEmbedding, SparseTextEmbedding
@@ -138,15 +137,9 @@ def load_models_and_documents():
138
  type_v=GGML_TYPE_I8
139
  )
140
 
141
- #dense_model = OptimumEncoder(
142
- #device="cuda",
143
- #cache_dir=os.getenv('HF_HOME')
144
- #)
145
-
146
- dense_model = FastEmbedEncoder(
147
- name='mixedbread-ai/mxbai-embed-large-v1',
148
- cache_dir=os.getenv('HF_HOME'),
149
- providers=['CPUExecutionProvider']
150
  )
151
 
152
  sparse_model = SparseTextEmbedding(
 
13
  from qdrant_client import QdrantClient, models
14
  from llama_cpp import Llama, GGML_TYPE_I8
15
  from optimum_encoder import OptimumEncoder
 
16
  from unstructured.partition.auto import partition
17
  from statistical_chunker import StatisticalChunker
18
  from fastembed import SparseEmbedding, SparseTextEmbedding
 
137
  type_v=GGML_TYPE_I8
138
  )
139
 
140
+ dense_model = OptimumEncoder(
141
+ device="cuda",
142
+ cache_dir=os.getenv('HF_HOME')
 
 
 
 
 
 
143
  )
144
 
145
  sparse_model = SparseTextEmbedding(