Skip to content

Commit

Permalink
Merge pull request #200 from karthikcs/kar_docs
Browse files Browse the repository at this point in the history
Adding feature to support doc and docx file for LocalGPT
  • Loading branch information
PromtEngineer committed Jul 4, 2023
2 parents 89ac90d + 0114604 commit 002b715
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
4 changes: 3 additions & 1 deletion constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from chromadb.config import Settings

# https://python.langchain.com/en/latest/modules/indexes/document_loaders/examples/excel.html?highlight=xlsx#microsoft-excel
from langchain.document_loaders import CSVLoader, PDFMinerLoader, TextLoader, UnstructuredExcelLoader
from langchain.document_loaders import CSVLoader, PDFMinerLoader, TextLoader, UnstructuredExcelLoader, Docx2txtLoader

# load_dotenv()
ROOT_DIRECTORY = os.path.dirname(os.path.realpath(__file__))
Expand All @@ -30,6 +30,8 @@
".csv": CSVLoader,
".xls": UnstructuredExcelLoader,
".xlxs": UnstructuredExcelLoader,
".docx": Docx2txtLoader,
".doc": Docx2txtLoader,
}

# Default Instructor Model
Expand Down
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ protobuf==3.20.0; sys_platform != 'darwin'
protobuf==3.20.0; sys_platform == 'darwin' and platform_machine != 'arm64'
protobuf==3.20.3; sys_platform == 'darwin' and platform_machine == 'arm64'
auto-gptq
docx2txt

# Utilities
urllib3==1.26.6
Expand Down

0 comments on commit 002b715

Please sign in to comment.