luke9705 commited on
Commit
79fd03c
·
1 Parent(s): ce6255c

Update agent initialization parameters and model reference in app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -168,18 +168,18 @@ def generate_audio(prompt: str) -> object:
168
  ## agent definition
169
  class Agent:
170
  def __init__(self, ):
171
- client = HfApiModel("deepseek-ai/DeepSeek-R1-0528", provider="nebius", api_key=os.getenv("NEBIUS_API_KEY"))
172
  """client = OpenAIServerModel(
173
  model_id="claude-sonnet-4-20250514",
174
  api_base="https://api.anthropic.com/v1/",
175
  api_key=os.environ["ANTHROPIC_API_KEY"],
176
- )"""
177
  self.agent = CodeAgent(
178
  model=client,
179
  tools=[DuckDuckGoSearchTool(max_results=5), VisitWebpageTool(max_output_length=20000), generate_image, download_images, transcribe_audio],
180
  additional_authorized_imports=["pandas", "PIL", "io"],
181
- planning_interval=1,
182
- max_steps=5,
183
  stream_outputs=False,
184
  final_answer_checks=[check_format]
185
  )
 
168
  ## agent definition
169
  class Agent:
170
  def __init__(self, ):
171
+ client = HfApiModel("deepseek-ai/DeepSeek-R1", provider="nebius", api_key=os.getenv("NEBIUS_API_KEY"))
172
  """client = OpenAIServerModel(
173
  model_id="claude-sonnet-4-20250514",
174
  api_base="https://api.anthropic.com/v1/",
175
  api_key=os.environ["ANTHROPIC_API_KEY"],
176
+ )"""
177
  self.agent = CodeAgent(
178
  model=client,
179
  tools=[DuckDuckGoSearchTool(max_results=5), VisitWebpageTool(max_output_length=20000), generate_image, download_images, transcribe_audio],
180
  additional_authorized_imports=["pandas", "PIL", "io"],
181
+ planning_interval=3,
182
+ max_steps=6,
183
  stream_outputs=False,
184
  final_answer_checks=[check_format]
185
  )