Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -89,9 +89,10 @@ def rag(input_text, file):
|
|
89 |
# for f in file:
|
90 |
# documents += SimpleDirectoryReader(f).load_data()
|
91 |
# f = file + "*.pdf"
|
92 |
-
path =
|
93 |
shutil.copyfile(file.name, path)
|
94 |
f = path
|
|
|
95 |
documents = SimpleDirectoryReader(f).load_data()
|
96 |
index = VectorStoreIndex.from_documents(documents)
|
97 |
# collection.add(
|
|
|
89 |
# for f in file:
|
90 |
# documents += SimpleDirectoryReader(f).load_data()
|
91 |
# f = file + "*.pdf"
|
92 |
+
path = os.path.basename(file)
|
93 |
shutil.copyfile(file.name, path)
|
94 |
f = path
|
95 |
+
echo file.name + ", " + fine.orig_name + ", " + f
|
96 |
documents = SimpleDirectoryReader(f).load_data()
|
97 |
index = VectorStoreIndex.from_documents(documents)
|
98 |
# collection.add(
|