Update app.py
Browse files
app.py
CHANGED
@@ -36,7 +36,8 @@ def pdf_changes(pdf_doc, open_ai_key):
|
|
36 |
documents = loader.load()
|
37 |
text_splitter = CharacterTextSplitter(chunk_size=1000, chunk_overlap=0)
|
38 |
texts = text_splitter.split_documents(documents)
|
39 |
-
embeddings = OpenAIEmbeddings()
|
|
|
40 |
db = Chroma.from_documents(texts, embeddings)
|
41 |
retriever = db.as_retriever()
|
42 |
global qa
|
|
|
36 |
documents = loader.load()
|
37 |
text_splitter = CharacterTextSplitter(chunk_size=1000, chunk_overlap=0)
|
38 |
texts = text_splitter.split_documents(documents)
|
39 |
+
embeddings = OpenAIEmbeddings(model="gpt-35-turbo", chunk_size=1000)
|
40 |
+
|
41 |
db = Chroma.from_documents(texts, embeddings)
|
42 |
retriever = db.as_retriever()
|
43 |
global qa
|