syaffers commited on
Commit
96fc622
·
1 Parent(s): 88b1fbb

refactor: remove pandas and pin reqs

Browse files
Files changed (3) hide show
  1. agent.json +2 -7
  2. app.py +7 -5
  3. requirements.txt +4 -4
agent.json CHANGED
@@ -1,9 +1,5 @@
1
  {
2
- "tools": [
3
- "web_search",
4
- "visit_webpage",
5
- "final_answer"
6
- ],
7
  "model": {
8
  "class": "HfApiModel",
9
  "data": {
@@ -41,7 +37,6 @@
41
  "stat",
42
  "datetime",
43
  "random",
44
- "pandas",
45
  "itertools",
46
  "math",
47
  "statistics",
@@ -50,4 +45,4 @@
50
  "collections",
51
  "re"
52
  ]
53
- }
 
1
  {
2
+ "tools": ["web_search", "visit_webpage", "final_answer"],
 
 
 
 
3
  "model": {
4
  "class": "HfApiModel",
5
  "data": {
 
37
  "stat",
38
  "datetime",
39
  "random",
 
40
  "itertools",
41
  "math",
42
  "statistics",
 
45
  "collections",
46
  "re"
47
  ]
48
+ }
app.py CHANGED
@@ -2,7 +2,7 @@ import datetime
2
  import pytz
3
  import yaml
4
 
5
- from smolagents import CodeAgent, HfApiModel, load_tool, tool
6
 
7
  from Gradio_UI import GradioUI
8
  from tools.final_answer import FinalAnswerTool
@@ -51,15 +51,17 @@ model = HfApiModel(
51
  )
52
 
53
 
54
- # Import tool from Hub
55
- image_generation_tool = load_tool("agents-course/text-to-image", trust_remote_code=True)
56
-
57
  with open("prompts.yaml", "r") as stream:
58
  prompt_templates = yaml.safe_load(stream)
59
 
 
 
 
 
 
60
  agent = CodeAgent(
61
  model=model,
62
- tools=[final_answer], ## add your tools here (don't remove final answer)
63
  max_steps=6,
64
  verbosity_level=1,
65
  grammar=None,
 
2
  import pytz
3
  import yaml
4
 
5
+ from smolagents import CodeAgent, HfApiModel, tool
6
 
7
  from Gradio_UI import GradioUI
8
  from tools.final_answer import FinalAnswerTool
 
51
  )
52
 
53
 
 
 
 
54
  with open("prompts.yaml", "r") as stream:
55
  prompt_templates = yaml.safe_load(stream)
56
 
57
+
58
+ tools = [
59
+ FinalAnswerTool(),
60
+ ]
61
+
62
  agent = CodeAgent(
63
  model=model,
64
+ tools=tools, ## add your tools here (don't remove final answer)
65
  max_steps=6,
66
  verbosity_level=1,
67
  grammar=None,
requirements.txt CHANGED
@@ -1,5 +1,5 @@
1
- markdownify
2
  smolagents==1.13.0
3
- requests
4
- duckduckgo_search
5
- pandas
 
1
+ markdownify==1.1.0
2
  smolagents==1.13.0
3
+ requests==2.32.4
4
+ duckduckgo_search==8.0.4
5
+ pytz==2025.2