Update app.py
Browse files
app.py
CHANGED
@@ -95,7 +95,7 @@ model = TransformersModel(
|
|
95 |
model_id=model_id,
|
96 |
max_new_tokens=256)
|
97 |
|
98 |
-
|
99 |
|
100 |
|
101 |
class BasicAgent:
|
@@ -104,7 +104,7 @@ class BasicAgent:
|
|
104 |
self.agent = CodeAgent(
|
105 |
model=model,
|
106 |
tools=[web_search,python_interpreter,visit_webpage_tool,model_math_tool],
|
107 |
-
max_steps=
|
108 |
verbosity_level=1,
|
109 |
grammar=None,
|
110 |
planning_interval=1,
|
@@ -176,7 +176,7 @@ def run_and_submit_all( profile: gr.OAuthProfile | None):
|
|
176 |
results_log = []
|
177 |
answers_payload = []
|
178 |
print(f"Running agent on {len(questions_data)} questions...")
|
179 |
-
for item in questions_data
|
180 |
task_id = item.get("task_id")
|
181 |
question_text = item.get("question")
|
182 |
if not task_id or question_text is None:
|
|
|
95 |
model_id=model_id,
|
96 |
max_new_tokens=256)
|
97 |
|
98 |
+
model = HfApiModel()
|
99 |
|
100 |
|
101 |
class BasicAgent:
|
|
|
104 |
self.agent = CodeAgent(
|
105 |
model=model,
|
106 |
tools=[web_search,python_interpreter,visit_webpage_tool,model_math_tool],
|
107 |
+
max_steps=2,
|
108 |
verbosity_level=1,
|
109 |
grammar=None,
|
110 |
planning_interval=1,
|
|
|
176 |
results_log = []
|
177 |
answers_payload = []
|
178 |
print(f"Running agent on {len(questions_data)} questions...")
|
179 |
+
for item in questions_data:
|
180 |
task_id = item.get("task_id")
|
181 |
question_text = item.get("question")
|
182 |
if not task_id or question_text is None:
|