Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -42,7 +42,7 @@ def pdf_to_text(pdf_file, query):
|
|
42 |
|
43 |
index = VectorstoreIndexCreator(
|
44 |
embedding=HuggingFaceEmbeddings(),
|
45 |
-
text_splitter=
|
46 |
#inference
|
47 |
qa = VectorDBQA.from_chain_type(llm=llm, chain_type="stuff", vectorstore=vectorstore)
|
48 |
from langchain.chains import RetrievalQA
|
|
|
42 |
|
43 |
index = VectorstoreIndexCreator(
|
44 |
embedding=HuggingFaceEmbeddings(),
|
45 |
+
text_splitter= CharacterTextSplitter(chunk_size=1000, chunk_overlap=0).from_loaders(loaders))
|
46 |
#inference
|
47 |
qa = VectorDBQA.from_chain_type(llm=llm, chain_type="stuff", vectorstore=vectorstore)
|
48 |
from langchain.chains import RetrievalQA
|