Commit
·
d89b7d5
1
Parent(s):
f82c642
Update handler.py
Browse files- handler.py +5 -1
handler.py
CHANGED
|
@@ -20,7 +20,11 @@ def start_haystack():
|
|
| 20 |
|
| 21 |
def load_and_write_data(document_store):
|
| 22 |
|
| 23 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 24 |
print("Loading data ...")
|
| 25 |
|
| 26 |
docs = convert_files_to_docs(dir_path=doc_dir, clean_func=clean_wiki_text, split_paragraphs=True)
|
|
|
|
| 20 |
|
| 21 |
def load_and_write_data(document_store):
|
| 22 |
|
| 23 |
+
# Get the absolute path of the script
|
| 24 |
+
script_path = os.path.realpath(__file__)
|
| 25 |
+
# Get the script directory
|
| 26 |
+
script_dir = os.path.dirname(script_path)
|
| 27 |
+
doc_dir = script_dir + "/dao_data"
|
| 28 |
print("Loading data ...")
|
| 29 |
|
| 30 |
docs = convert_files_to_docs(dir_path=doc_dir, clean_func=clean_wiki_text, split_paragraphs=True)
|