Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -22,7 +22,7 @@ def get_pdf_text(pdf_docs):
|
|
| 22 |
def get_text_chunks(text):
|
| 23 |
text_splitter = CharacterTextSplitter(
|
| 24 |
separator="\n",
|
| 25 |
-
chunk_size=
|
| 26 |
chunk_overlap=200,
|
| 27 |
length_function=len
|
| 28 |
)
|
|
@@ -39,7 +39,7 @@ def get_vectorstore(text_chunks):
|
|
| 39 |
|
| 40 |
def get_conversation_chain(vectorstore):
|
| 41 |
#llm = ChatOpenAI()
|
| 42 |
-
llm = HuggingFaceHub(repo_id="google/flan-t5-xxl", model_kwargs={"temperature":0.5, "max_length":
|
| 43 |
|
| 44 |
memory = ConversationBufferMemory(
|
| 45 |
memory_key='chat_history', return_messages=True)
|
|
|
|
| 22 |
def get_text_chunks(text):
|
| 23 |
text_splitter = CharacterTextSplitter(
|
| 24 |
separator="\n",
|
| 25 |
+
chunk_size=512,
|
| 26 |
chunk_overlap=200,
|
| 27 |
length_function=len
|
| 28 |
)
|
|
|
|
| 39 |
|
| 40 |
def get_conversation_chain(vectorstore):
|
| 41 |
#llm = ChatOpenAI()
|
| 42 |
+
llm = HuggingFaceHub(repo_id="google/flan-t5-xxl", model_kwargs={"temperature":0.5, "max_length":512})
|
| 43 |
|
| 44 |
memory = ConversationBufferMemory(
|
| 45 |
memory_key='chat_history', return_messages=True)
|