From ae5e484506d6169cefcdf17d9690c4bb0b24ba47 Mon Sep 17 00:00:00 2001 From: Alex Date: Thu, 2 Nov 2023 18:25:43 +0000 Subject: [PATCH] fix docx file --- application/api/user/routes.py | 4 +++- application/requirements.txt | 1 + frontend/src/Navigation.tsx | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/application/api/user/routes.py b/application/api/user/routes.py index b80562b2..e62f52fb 100644 --- a/application/api/user/routes.py +++ b/application/api/user/routes.py @@ -153,7 +153,9 @@ def upload_file(): os.makedirs(save_dir) file.save(os.path.join(save_dir, filename)) - task = ingest.delay(settings.UPLOAD_FOLDER, [".rst", ".md", ".pdf", ".txt"], job_name, filename, user) + task = ingest.delay(settings.UPLOAD_FOLDER, [".rst", ".md", ".pdf", ".txt", ".docx", + ".csv", ".epub", ".html", ".mdx"], + job_name, filename, user) # task id task_id = task.id return {"status": "ok", "task_id": task_id} diff --git a/application/requirements.txt b/application/requirements.txt index b6f5f8d0..5b4db647 100644 --- a/application/requirements.txt +++ b/application/requirements.txt @@ -20,6 +20,7 @@ click-repl==0.2.0 cryptography==41.0.4 dataclasses-json==0.5.7 decorator==5.1.1 +docx2txt==0.8 dill==0.3.6 dnspython==2.3.0 ecdsa==0.18.0 diff --git a/frontend/src/Navigation.tsx b/frontend/src/Navigation.tsx index 063e9cae..87bab842 100644 --- a/frontend/src/Navigation.tsx +++ b/frontend/src/Navigation.tsx @@ -280,7 +280,7 @@ export default function Navigation({ navOpen, setNavOpen }: NavigationProps) { onClick={() => setUploadModalState('ACTIVE')} > {isDocsListOpen && ( -
+
{docs ? ( docs.map((doc, index) => { if (doc.model === embeddingsName) {