Spaces:
Running
Running
Commit
•
e0c5056
1
Parent(s):
8eb0be8
Update main.py
Browse files
main.py
CHANGED
@@ -98,7 +98,7 @@ async def process_data(data: DataInput):
|
|
98 |
|
99 |
dom = [LangchainDocument(page_content=response_data, metadata={"source": "local"})]
|
100 |
|
101 |
-
text_splitter = CharacterTextSplitter(chunk_size=
|
102 |
docs = text_splitter.split_documents(dom)
|
103 |
|
104 |
embeddings = HuggingFaceEmbeddings()
|
@@ -106,7 +106,7 @@ async def process_data(data: DataInput):
|
|
106 |
|
107 |
llm = HuggingFaceEndpoint(
|
108 |
repo_id="google/flan-t5-large",
|
109 |
-
temperature=0.
|
110 |
)
|
111 |
|
112 |
chain = load_qa_chain(llm, chain_type="stuff")
|
|
|
98 |
|
99 |
dom = [LangchainDocument(page_content=response_data, metadata={"source": "local"})]
|
100 |
|
101 |
+
text_splitter = CharacterTextSplitter(chunk_size=1000, chunk_overlap=0)
|
102 |
docs = text_splitter.split_documents(dom)
|
103 |
|
104 |
embeddings = HuggingFaceEmbeddings()
|
|
|
106 |
|
107 |
llm = HuggingFaceEndpoint(
|
108 |
repo_id="google/flan-t5-large",
|
109 |
+
temperature=0.5
|
110 |
)
|
111 |
|
112 |
chain = load_qa_chain(llm, chain_type="stuff")
|