RCaz commited on
Commit
29f5991
·
verified ·
1 Parent(s): 939eafb

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -2
app.py CHANGED
@@ -6,6 +6,8 @@ import pandas as pd
6
  import yaml
7
  from smolagents import DuckDuckGoSearchTool, CodeAgent, WikipediaSearchTool, GoogleSearchTool, FinalAnswerTool, InferenceClientModel
8
 
 
 
9
 
10
  # (Keep Constants as is)
11
  # --- Constants ---
@@ -19,13 +21,13 @@ class BasicAgent:
19
  prompt_templates = yaml.safe_load(stream)
20
 
21
  model = InferenceClientModel(
22
- max_tokens=200,
23
  temperature=0,
24
  model_id='Qwen/Qwen2.5-Coder-32B-Instruct',# it is possible that this model may be overloaded
25
  )
26
  self.agent = CodeAgent(
27
  model=model,
28
- tools=[DuckDuckGoSearchTool(), WikipediaSearchTool(),FinalAnswerTool()],
29
  prompt_templates=prompt_templates,
30
  additional_authorized_imports=['datetime','numpy','pandas'],
31
  max_steps=3
 
6
  import yaml
7
  from smolagents import DuckDuckGoSearchTool, CodeAgent, WikipediaSearchTool, GoogleSearchTool, FinalAnswerTool, InferenceClientModel
8
 
9
+ from tools import translator, image_qa
10
+
11
 
12
  # (Keep Constants as is)
13
  # --- Constants ---
 
21
  prompt_templates = yaml.safe_load(stream)
22
 
23
  model = InferenceClientModel(
24
+ max_tokens=100,
25
  temperature=0,
26
  model_id='Qwen/Qwen2.5-Coder-32B-Instruct',# it is possible that this model may be overloaded
27
  )
28
  self.agent = CodeAgent(
29
  model=model,
30
+ tools=[DuckDuckGoSearchTool(), WikipediaSearchTool(),FinalAnswerTool(),translator, image_qa],
31
  prompt_templates=prompt_templates,
32
  additional_authorized_imports=['datetime','numpy','pandas'],
33
  max_steps=3