Sauten commited on
Commit
15023ae
·
verified ·
1 Parent(s): 3ebb9ea

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +11 -10
app.py CHANGED
@@ -39,17 +39,18 @@ class BasicAgent:
39
 
40
 
41
  agent = CodeAgent(
42
- tools=[final_answer, search],#[detection_tool],
43
- model=model,
44
- max_steps=5,
45
- verbosity_level=1,
46
- planning_interval=2,
47
- #additional_authorized_imports=["json", "from PIL import Image, ImageDraw, ImageFont", "import matplotlib.pyplot as plt", "from typing import List, Dict"],
48
- #managed_agents=[detection_agent]
49
- #description="Solves the task"
50
  )
 
 
 
 
51
 
52
- fixed_answer = agent
53
 
54
  # url = "https://api.fireworks.ai/inference/v1/chat/completions"
55
  # payload = {
@@ -91,7 +92,7 @@ class BasicAgent:
91
 
92
 
93
  # print(f"Agent returning fixed answer: {fixed_answer}")
94
- return fixed_answer
95
 
96
 
97
 
 
39
 
40
 
41
  agent = CodeAgent(
42
+ tools=[final_answer, search],
43
+ model=model,
44
+ max_steps=5,
45
+ verbosity_level=1,
46
+ planning_interval=2
 
 
 
47
  )
48
+
49
+ # Get the actual answer from the agent
50
+ answer = agent.run(question) # Assuming run() returns the answer
51
+ return str(answer) # Ensure it's a string
52
 
53
+ #fixed_answer = agent
54
 
55
  # url = "https://api.fireworks.ai/inference/v1/chat/completions"
56
  # payload = {
 
92
 
93
 
94
  # print(f"Agent returning fixed answer: {fixed_answer}")
95
+ #return fixed_answer
96
 
97
 
98