Spaces:
Sleeping
Sleeping
File size: 476 Bytes
2717026 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
import os
from langchain.document_loaders import PDFMinerLoader, TextLoader
from db import db
question = None
root = os.path.dirname(os.path.realpath(__file__))
SOURCE_DIRECTORY = f"{root}/SOURCE_DOCUMENTS"
db_all = db("all", root)
db_frankl = db("frankl", root)
db_inst = db("inst", root)
INGEST_THREADS = os.cpu_count()
DOCUMENT_MAP = {
".txt": TextLoader,
".pdf": PDFMinerLoader,
}
# Default Instructor Model
EMBEDDING_MODEL_NAME = "hkunlp/instructor-large"
|