shoom013 commited on
Commit
b4f6b6b
1 Parent(s): 950aabc

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -3
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,