dinhquangson commited on
Commit
fea1af2
1 Parent(s): c059db6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -6
app.py CHANGED
@@ -36,6 +36,13 @@ import logging
36
  logging.basicConfig(format="%(levelname)s - %(name)s - %(message)s", level=logging.WARNING)
37
  logging.getLogger("haystack").setLevel(logging.INFO)
38
 
 
 
 
 
 
 
 
39
  @app.post("/uploadfile/")
40
  async def create_upload_file(text_field: str, file: UploadFile = File(...)):
41
  # Imports
@@ -74,12 +81,6 @@ async def create_upload_file(text_field: str, file: UploadFile = File(...)):
74
 
75
  # Indexing
76
 
77
- document_store = QdrantDocumentStore(
78
- path="database",
79
- recreate_index=True,
80
- use_sparse_embeddings=True,
81
- embedding_dim = 384
82
- )
83
 
84
  indexing = Pipeline()
85
  indexing.add_component("sparse_doc_embedder", FastembedSparseDocumentEmbedder(model="prithvida/Splade_PP_en_v1"))
 
36
  logging.basicConfig(format="%(levelname)s - %(name)s - %(message)s", level=logging.WARNING)
37
  logging.getLogger("haystack").setLevel(logging.INFO)
38
 
39
+ document_store = QdrantDocumentStore(
40
+ path="database",
41
+ recreate_index=True,
42
+ use_sparse_embeddings=True,
43
+ embedding_dim = 384
44
+ )
45
+
46
  @app.post("/uploadfile/")
47
  async def create_upload_file(text_field: str, file: UploadFile = File(...)):
48
  # Imports
 
81
 
82
  # Indexing
83
 
 
 
 
 
 
 
84
 
85
  indexing = Pipeline()
86
  indexing.add_component("sparse_doc_embedder", FastembedSparseDocumentEmbedder(model="prithvida/Splade_PP_en_v1"))