Spaces:
Sleeping
Sleeping
Update file_loader.py
Browse files- file_loader.py +14 -12
file_loader.py
CHANGED
@@ -27,20 +27,22 @@ def get_vectorstore():
|
|
27 |
# urls_list
|
28 |
# base_urls =['https://fda.neu.edu.vn/hoi-nghi-khoa-hoc-cong-nghe-dai-hoc-kinh-te-quoc-dan-nam-2025/']
|
29 |
# ['https://nct.neu.edu.vn/', 'https://fsf.neu.edu.vn/', 'https://mfe.neu.edu.vn/', 'https://mis.neu.edu.vn/', 'https://fda.neu.edu.vn/', 'https://khoathongke.neu.edu.vn/', 'https://fit.neu.edu.vn/']
|
30 |
-
website_contents = get_web_documents(base_urls=base_urls)
|
31 |
-
all_splits += website_contents
|
32 |
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
|
|
|
|
|
|
|
|
38 |
|
39 |
-
print('Feeding .json files')
|
40 |
-
# Xử lý FAQ
|
41 |
-
FAQ_path = "syllabus_nct_word_format/FAQ.json"
|
42 |
-
FAQ_splits = get_json_splits_only(FAQ_path)
|
43 |
-
all_splits += FAQ_splits
|
44 |
|
45 |
FAQ_path = "syllabus_nct_word_format/FAQ2.json"
|
46 |
FAQ_splits = get_json_splits_only(FAQ_path)
|
|
|
27 |
# urls_list
|
28 |
# base_urls =['https://fda.neu.edu.vn/hoi-nghi-khoa-hoc-cong-nghe-dai-hoc-kinh-te-quoc-dan-nam-2025/']
|
29 |
# ['https://nct.neu.edu.vn/', 'https://fsf.neu.edu.vn/', 'https://mfe.neu.edu.vn/', 'https://mis.neu.edu.vn/', 'https://fda.neu.edu.vn/', 'https://khoathongke.neu.edu.vn/', 'https://fit.neu.edu.vn/']
|
|
|
|
|
30 |
|
31 |
+
|
32 |
+
# website_contents = get_web_documents(base_urls=base_urls)
|
33 |
+
# all_splits += website_contents
|
34 |
+
|
35 |
+
# print('Feeding .docx files')
|
36 |
+
# for i, file_path in enumerate(tqdm(docx_files, desc="Đang xử lý", unit="file")):
|
37 |
+
# output_json_path = f"output_{i}.json"
|
38 |
+
# splits = get_splits(file_path, output_json_path)
|
39 |
+
# all_splits += splits
|
40 |
|
41 |
+
# print('Feeding .json files')
|
42 |
+
# # Xử lý FAQ
|
43 |
+
# FAQ_path = "syllabus_nct_word_format/FAQ.json"
|
44 |
+
# FAQ_splits = get_json_splits_only(FAQ_path)
|
45 |
+
# all_splits += FAQ_splits
|
46 |
|
47 |
FAQ_path = "syllabus_nct_word_format/FAQ2.json"
|
48 |
FAQ_splits = get_json_splits_only(FAQ_path)
|