Spaces:
Sleeping
Sleeping
Update app.py
Browse files
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 |
-
|
93 |
# shutil.copyfile(file.name, path)
|
94 |
-
print("pathname=" +
|
95 |
print("basename=" + os.path.basename(file))
|
96 |
print("filename=" + file.name)
|
97 |
-
documents = SimpleDirectoryReader(
|
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,
|