Update app.py
Browse files
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 |
-
|
|
|
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(
|