Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -71,7 +71,7 @@ def get_pdf_text(pdf_docs):
|
|
71 |
def get_text_chunks(text):
|
72 |
text_splitter = CharacterTextSplitter(
|
73 |
separator='\n',
|
74 |
-
chunk_size =
|
75 |
chunk_overlap = 200,
|
76 |
length_function = len
|
77 |
)
|
@@ -86,7 +86,7 @@ def get_vectorstore(text_chunks):
|
|
86 |
def get_conversation_chain(vectorstore):
|
87 |
llm = HuggingFaceHub(
|
88 |
repo_id = 'google/flan-t5-xxl',
|
89 |
-
model_kwargs = {"temperature":0.5, "max_length":
|
90 |
)
|
91 |
memory = ConversationBufferMemory(
|
92 |
memory_key='chat_history',
|
|
|
71 |
def get_text_chunks(text):
|
72 |
text_splitter = CharacterTextSplitter(
|
73 |
separator='\n',
|
74 |
+
chunk_size = 500,
|
75 |
chunk_overlap = 200,
|
76 |
length_function = len
|
77 |
)
|
|
|
86 |
def get_conversation_chain(vectorstore):
|
87 |
llm = HuggingFaceHub(
|
88 |
repo_id = 'google/flan-t5-xxl',
|
89 |
+
model_kwargs = {"temperature":0.5, "max_length":256}
|
90 |
)
|
91 |
memory = ConversationBufferMemory(
|
92 |
memory_key='chat_history',
|