Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -9,15 +9,6 @@ from langchain.memory import ConversationBufferMemory as MEM,RedisChatMessageHis
|
|
9 |
from langchain.schema import SystemMessage as SM,HumanMessage as HM, AIMessage as AM
|
10 |
from langchain import hub
|
11 |
import os
|
12 |
-
something=r"/usr/local/lib/python3.10/site-packages/huggingface_hub/inference/_client.py"
|
13 |
-
with open(something,"r") as read1:
|
14 |
-
a=read1.read()
|
15 |
-
with open(something,"w") as write1:
|
16 |
-
write1.write(a.replace(", stream=stream",""))
|
17 |
-
with open("/usr/local/lib/python3.10/site-packages/langchain_huggingface/llms/huggingface_endpoint.py","r") as read1:
|
18 |
-
a=read1.read()
|
19 |
-
with open("/usr/local/lib/python3.10/site-packages/langchain_huggingface/llms/huggingface_endpoint.py","w") as write1:
|
20 |
-
write1.write(a.replace(", stream=True",""))
|
21 |
from langchain_core.prompts.chat import ChatPromptTemplate, MessagesPlaceholder
|
22 |
system = '''Respond to the human as helpfully and accurately as possible. You have access to the following tools:
|
23 |
|
|
|
9 |
from langchain.schema import SystemMessage as SM,HumanMessage as HM, AIMessage as AM
|
10 |
from langchain import hub
|
11 |
import os
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12 |
from langchain_core.prompts.chat import ChatPromptTemplate, MessagesPlaceholder
|
13 |
system = '''Respond to the human as helpfully and accurately as possible. You have access to the following tools:
|
14 |
|