Spaces:
Sleeping
Sleeping
Syed Junaid Iqbal
commited on
Commit
•
9db002b
1
Parent(s):
6767d87
Update app.py
Browse files
app.py
CHANGED
@@ -21,6 +21,11 @@ from langchain.callbacks.streaming_stdout import StreamingStdOutCallbackHandler
|
|
21 |
from langchain import hub
|
22 |
from langchain.prompts import PromptTemplate
|
23 |
|
|
|
|
|
|
|
|
|
|
|
24 |
def init_retriever():
|
25 |
"""
|
26 |
Initialize and return the retriever function
|
@@ -30,7 +35,7 @@ def init_retriever():
|
|
30 |
template = 0.4,
|
31 |
n_ctx=4000,
|
32 |
max_tokens=4000,
|
33 |
-
n_gpu_layers =
|
34 |
n_batch = 512,
|
35 |
callback_manager=callback_manager,
|
36 |
verbose=True)
|
|
|
21 |
from langchain import hub
|
22 |
from langchain.prompts import PromptTemplate
|
23 |
|
24 |
+
# Function to update the chat output dynamically
|
25 |
+
def update_chat_output(msg):
|
26 |
+
st.session_state.messages.append({"role": "assistant", "content": msg})
|
27 |
+
st.chat_message("assistant").write(msg)
|
28 |
+
|
29 |
def init_retriever():
|
30 |
"""
|
31 |
Initialize and return the retriever function
|
|
|
35 |
template = 0.4,
|
36 |
n_ctx=4000,
|
37 |
max_tokens=4000,
|
38 |
+
n_gpu_layers = 10,
|
39 |
n_batch = 512,
|
40 |
callback_manager=callback_manager,
|
41 |
verbose=True)
|