Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -83,9 +83,10 @@ index = VectorStoreIndex.from_vector_store(vector_store, embed_model=Settings.em
|
|
83 |
query_engine = index.as_query_engine()
|
84 |
def rag(input_text, file):
|
85 |
if (file):
|
86 |
-
documents = []
|
87 |
-
for f in file:
|
88 |
-
documents += SimpleDirectoryReader(f).load_data()
|
|
|
89 |
index = VectorStoreIndex.from_documents(documents)
|
90 |
# collection.add(
|
91 |
# documents=documents,
|
|
|
83 |
query_engine = index.as_query_engine()
|
84 |
def rag(input_text, file):
|
85 |
if (file):
|
86 |
+
# documents = []
|
87 |
+
# for f in file:
|
88 |
+
# documents += SimpleDirectoryReader(f).load_data()
|
89 |
+
documents = SimpleDirectoryReader(file).load_data()
|
90 |
index = VectorStoreIndex.from_documents(documents)
|
91 |
# collection.add(
|
92 |
# documents=documents,
|