Spaces:
Sleeping
Sleeping
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
|
@@ -66,7 +66,7 @@ prompt = ChatPromptTemplate.from_messages(
|
|
66 |
#m=M.from_pretrained("peterpeter8585/syai4.3")
|
67 |
#t=T.from_pretrained("peterpeter8585/syai4.3")
|
68 |
#pipe=pipeline(model=m,tokenizer=t,task="text-generation")
|
69 |
-
llm=HF(
|
70 |
from langchain.retrievers import WikipediaRetriever as Wiki
|
71 |
import gradio as gr
|
72 |
chatbot = gr.Chatbot(
|
|
|
1 |
+
from langchain_huggingface import HuggingFacePipeline as HF, ChatHuggingFace as Ch
|
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
|
|
|
66 |
#m=M.from_pretrained("peterpeter8585/syai4.3")
|
67 |
#t=T.from_pretrained("peterpeter8585/syai4.3")
|
68 |
#pipe=pipeline(model=m,tokenizer=t,task="text-generation")
|
69 |
+
llm=HF.from_model_id(model_id="peterpeter8585/syai4.6",task="text-generation")
|
70 |
from langchain.retrievers import WikipediaRetriever as Wiki
|
71 |
import gradio as gr
|
72 |
chatbot = gr.Chatbot(
|