keynes42 commited on
Commit
dabac72
·
verified ·
1 Parent(s): fdc8f8b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -72,7 +72,8 @@ class BasicAgent:
72
  # See list of base tools in https://github.com/huggingface/smolagents/blob/main/src/smolagents/default_tools.py
73
 
74
  # Initialize the agent
75
- self.pipe = load_llm(hf_token = os.environ["HF_TOKEN"])
 
76
  self.agent = CodeAgent(llm=self.pipe, tools=[], add_base_tools=True)
77
 
78
  # self.agent = CodeAgent(
 
72
  # See list of base tools in https://github.com/huggingface/smolagents/blob/main/src/smolagents/default_tools.py
73
 
74
  # Initialize the agent
75
+ pipe = load_llm(hf_token = os.environ["HF_TOKEN"])
76
+ self.pipe = FunctionLLM(lambda prompt: pipe(prompt)[0]["generated_text"])
77
  self.agent = CodeAgent(llm=self.pipe, tools=[], add_base_tools=True)
78
 
79
  # self.agent = CodeAgent(