nightfury commited on
Commit
cad60c2
·
verified ·
1 Parent(s): 108f56d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -2
app.py CHANGED
@@ -120,8 +120,12 @@ index = VectorStoreIndex(embed_model=embed_model, storage_context=storage_contex
120
 
121
  # Define and load documents with embeddings
122
  documents = [
123
- {"text": "Your document text here", "embedding": [0.1, 0.2, 0.3]},
 
 
 
124
  # Add more documents as needed
 
125
  ]
126
 
127
  # Load documents into ChromaDB using VectorStoreIndex
@@ -135,4 +139,6 @@ query_engine = RetrieverQueryEngine(auto_retriever)
135
 
136
  # Query documents using the RetrieverQuery Engine
137
  response = query_engine.query("Your query here")
138
- print(response)
 
 
 
120
 
121
  # Define and load documents with embeddings
122
  documents = [
123
+ {
124
+ "text": "Your document text here", "embedding": [0.1, 0.2, 0.3],
125
+ 'cricket': DirectoryLoader('/content/cricket', glob="*.pdf", loader_cls=PyPDFLoader).load(),
126
+ 'fifa': DirectoryLoader('/content/fifa', glob="*.pdf", loader_cls=PyPDFLoader).load(),
127
  # Add more documents as needed
128
+ },
129
  ]
130
 
131
  # Load documents into ChromaDB using VectorStoreIndex
 
139
 
140
  # Query documents using the RetrieverQuery Engine
141
  response = query_engine.query("Your query here")
142
+ print(response)
143
+
144
+