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