MEOW commited on
Commit
49ea89d
·
unverified ·
1 Parent(s): b7be5c0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -9
app.py CHANGED
@@ -60,15 +60,15 @@ def initialize_settings():
60
 
61
  # Create index from documents
62
  def create_index(documents):
63
- # vector_store = MilvusVectorStore(
64
- # host="127.0.0.1",
65
- # port=19530,
66
- # dim=1024,
67
- # collection_name="vectorstore",
68
- # gpu_id=0, # Specify the GPU ID to use
69
- # output_fields=["field1","field2"]
70
- #)
71
- vector_store = MilvusVectorStore(uri="./milvus_demo.db", dim=1024, overwrite=True) #For CPU only vector store
72
  storage_context = StorageContext.from_defaults(vector_store=vector_store)
73
  return VectorStoreIndex.from_documents(documents, storage_context=storage_context)
74
 
 
60
 
61
  # Create index from documents
62
  def create_index(documents):
63
+ vector_store = MilvusVectorStore(
64
+ host="127.0.0.1",
65
+ port=19530,
66
+ dim=1024,
67
+ collection_name="vectorstore",
68
+ gpu_id=0, # Specify the GPU ID to use
69
+ output_fields=["field1","field2"]
70
+ )
71
+ # vector_store = MilvusVectorStore(uri="./milvus_demo.db", dim=1024, overwrite=True) #For CPU only vector store
72
  storage_context = StorageContext.from_defaults(vector_store=vector_store)
73
  return VectorStoreIndex.from_documents(documents, storage_context=storage_context)
74