peterpeter8585 commited on
Commit
6bee03b
·
verified ·
1 Parent(s): 4081ea5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -1,4 +1,4 @@
1
- from langchain_huggingface import HuggingFaceEndpoint 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,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(repo_id="peterpeter8585/syai4.6",task="text-generation")
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(