Spaces:
Runtime error
Runtime error
deepozzzie
commited on
Commit
·
3ea8937
1
Parent(s):
b8d7fc5
Update app.py
Browse files
app.py
CHANGED
@@ -28,7 +28,7 @@ def pdf_changes(pdf_doc, open_ai_key):
|
|
28 |
print(loader)
|
29 |
documents = loader.load()
|
30 |
print(documents)
|
31 |
-
text_splitter = CharacterTextSplitter(chunk_size=2048, chunk_overlap=
|
32 |
print(text_splitter)
|
33 |
texts = text_splitter.split_documents(documents)
|
34 |
print(texts)
|
@@ -40,7 +40,7 @@ def pdf_changes(pdf_doc, open_ai_key):
|
|
40 |
print(retriever)
|
41 |
global qa
|
42 |
qa = ConversationalRetrievalChain.from_llm(
|
43 |
-
llm=OpenAI(temperature=0.
|
44 |
retriever=retriever,
|
45 |
return_source_documents=False)
|
46 |
return "Ready"
|
|
|
28 |
print(loader)
|
29 |
documents = loader.load()
|
30 |
print(documents)
|
31 |
+
text_splitter = CharacterTextSplitter(chunk_size=2048, chunk_overlap=0)
|
32 |
print(text_splitter)
|
33 |
texts = text_splitter.split_documents(documents)
|
34 |
print(texts)
|
|
|
40 |
print(retriever)
|
41 |
global qa
|
42 |
qa = ConversationalRetrievalChain.from_llm(
|
43 |
+
llm=OpenAI(temperature=0.3),
|
44 |
retriever=retriever,
|
45 |
return_source_documents=False)
|
46 |
return "Ready"
|