Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -1,4 +1,4 @@
|
|
1 |
-
from langchain_huggingface import
|
2 |
from subprocess import Popen, PIPE as P
|
3 |
from langchain_experimental.tools.python.tool import PythonREPLTool as PYT
|
4 |
from langchain.agents import load_tools, create_structured_chat_agent as Agent,AgentExecutor as Ex, AgentType as Type
|
@@ -62,7 +62,9 @@ prompt = ChatPromptTemplate.from_messages(
|
|
62 |
("human", human),
|
63 |
]
|
64 |
)
|
65 |
-
|
|
|
|
|
66 |
from langchain.retrievers import WikipediaRetriever as Wiki
|
67 |
import gradio as gr
|
68 |
chatbot = gr.Chatbot(
|
|
|
1 |
+
from langchain_huggingface import HuggingFacePipeline as HF
|
2 |
from subprocess import Popen, PIPE as P
|
3 |
from langchain_experimental.tools.python.tool import PythonREPLTool as PYT
|
4 |
from langchain.agents import load_tools, create_structured_chat_agent as Agent,AgentExecutor as Ex, AgentType as Type
|
|
|
62 |
("human", human),
|
63 |
]
|
64 |
)
|
65 |
+
from transformers import pipeline
|
66 |
+
pipe=pipeline(model="peterpeter8585/syai4.3",task="text-generation")
|
67 |
+
llm=HF(pipeline=pipe)
|
68 |
from langchain.retrievers import WikipediaRetriever as Wiki
|
69 |
import gradio as gr
|
70 |
chatbot = gr.Chatbot(
|