MEOW commited on
Commit
166d5d4
·
unverified ·
1 Parent(s): b694ebc

Update app.py

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