justinj92 commited on
Commit
160f6d0
·
verified ·
1 Parent(s): a77d753

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -3
app.py CHANGED
@@ -74,11 +74,10 @@ loader = DirectoryLoader(CFG.PDFs_path, glob="*.pdf", loader_cls=PyPDFLoader)
74
 
75
  documents = loader.load()
76
 
77
- @spaces.GPU(duration=120)
78
- text_splitter = RecursiveCharacterTextSplitter(chunk_size = CFG.split_chunk_size, chunk_overlap = CFG.split_overlap)
79
 
80
- @spaces.GPU(duration=120)
81
  texts = text_splitter.split_documents(documents)
 
82
  @spaces.GPU(duration=120)
83
  if not os.path.exists(CFG.Embeddings_path + '/index.faiss'):
84
  embeddings = HuggingFaceInstructEmbeddings(model_name = CFG.embeddings_model_repo, model_kwargs={"device":"cuda"})
 
74
 
75
  documents = loader.load()
76
 
 
 
77
 
78
+ text_splitter = RecursiveCharacterTextSplitter(chunk_size = CFG.split_chunk_size, chunk_overlap = CFG.split_overlap)
79
  texts = text_splitter.split_documents(documents)
80
+
81
  @spaces.GPU(duration=120)
82
  if not os.path.exists(CFG.Embeddings_path + '/index.faiss'):
83
  embeddings = HuggingFaceInstructEmbeddings(model_name = CFG.embeddings_model_repo, model_kwargs={"device":"cuda"})