MEOW commited on
Commit
e6bd2a7
·
unverified ·
1 Parent(s): 1504f08

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -9
app.py CHANGED
@@ -36,15 +36,15 @@ def initialize_settings():
36
 
37
  # Create index from documents
38
  def create_index(documents):
39
- vector_store = MilvusVectorStore(
40
- host="127.0.0.1",
41
- port=19530,
42
- dim=1024,
43
- collection_name="vectorstore",
44
- gpu_id=0 # Specify the GPU ID to use
45
- output_fields=["field1","field2"]
46
- )
47
- # vector_store = MilvusVectorStore(uri="./milvus_demo.db", dim=1024, overwrite=True) #For CPU only vector store
48
  storage_context = StorageContext.from_defaults(vector_store=vector_store)
49
  return VectorStoreIndex.from_documents(documents, storage_context=storage_context)
50
 
 
36
 
37
  # Create index from documents
38
  def create_index(documents):
39
+ #vector_store = MilvusVectorStore(
40
+ # host="127.0.0.1",
41
+ # port=19530,
42
+ # dim=1024,
43
+ # collection_name="vectorstore",
44
+ # gpu_id=0 # Specify the GPU ID to use
45
+ # output_fields=["field1","field2"]
46
+ #)
47
+ vector_store = MilvusVectorStore(uri="./milvus_demo.db", dim=1024, overwrite=True) #For CPU only vector store
48
  storage_context = StorageContext.from_defaults(vector_store=vector_store)
49
  return VectorStoreIndex.from_documents(documents, storage_context=storage_context)
50