shoom013 commited on
Commit
a6d68c1
1 Parent(s): c098e5a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -89,12 +89,12 @@ def rag(input_text, file):
89
  # for f in file:
90
  # documents += SimpleDirectoryReader(f).load_data()
91
  # f = file + "*.pdf"
92
- path = os.path.dirname
93
  # shutil.copyfile(file.name, path)
94
- print("pathname=" + path)
95
  print("basename=" + os.path.basename(file))
96
  print("filename=" + file.name)
97
- documents = SimpleDirectoryReader(path).load_data()
98
  index = VectorStoreIndex.from_documents(documents)
99
  # collection.add(
100
  # documents=documents,
 
89
  # for f in file:
90
  # documents += SimpleDirectoryReader(f).load_data()
91
  # f = file + "*.pdf"
92
+ pathname = os.path.dirname
93
  # shutil.copyfile(file.name, path)
94
+ print("pathname=" + pathname)
95
  print("basename=" + os.path.basename(file))
96
  print("filename=" + file.name)
97
+ documents = SimpleDirectoryReader(pathname).load_data()
98
  index = VectorStoreIndex.from_documents(documents)
99
  # collection.add(
100
  # documents=documents,