Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -114,8 +114,7 @@ def rag(input_text, file):
|
|
| 114 |
# )
|
| 115 |
|
| 116 |
def upload_file(filepath):
|
| 117 |
-
|
| 118 |
-
documents = SimpleDirectoryReader(file).load_data()
|
| 119 |
index = VectorStoreIndex.from_documents(documents)
|
| 120 |
query_engine = index.as_query_engine()
|
| 121 |
return filepath
|
|
|
|
| 114 |
# )
|
| 115 |
|
| 116 |
def upload_file(filepath):
|
| 117 |
+
documents = SimpleDirectoryReader(filepath).load_data()
|
|
|
|
| 118 |
index = VectorStoreIndex.from_documents(documents)
|
| 119 |
query_engine = index.as_query_engine()
|
| 120 |
return filepath
|