Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -118,9 +118,9 @@ def rag(input_text, history, jezik, file):
|
|
118 |
# resetChat()
|
119 |
print(history, input_text)
|
120 |
## if (file):
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
# f = file + "*.pdf"
|
125 |
## pathname = os.path.dirname
|
126 |
# shutil.copyfile(file.name, path)
|
|
|
118 |
# resetChat()
|
119 |
print(history, input_text)
|
120 |
## if (file):
|
121 |
+
documents = []
|
122 |
+
for f in file:
|
123 |
+
documents += SimpleDirectoryReader(f).load_data()
|
124 |
# f = file + "*.pdf"
|
125 |
## pathname = os.path.dirname
|
126 |
# shutil.copyfile(file.name, path)
|