Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -4,15 +4,9 @@ import requests
|
|
4 |
import inspect
|
5 |
import pandas as pd
|
6 |
from smolagents import (
|
7 |
-
WebSearchTool,
|
8 |
-
ToolCallingAgent,
|
9 |
-
LiteLLMModel,
|
10 |
DuckDuckGoSearchTool,
|
11 |
-
|
12 |
InferenceClientModel,
|
13 |
-
VisitWebpageTool,
|
14 |
-
WikipediaSearchTool,
|
15 |
-
FinalAnswerTool
|
16 |
)
|
17 |
|
18 |
# (Keep Constants as is)
|
@@ -27,8 +21,8 @@ class BasicAgent:
|
|
27 |
webTool = DuckDuckGoSearchTool()
|
28 |
model = InferenceClientModel("Qwen/Qwen2.5-72B-Instruct")
|
29 |
|
30 |
-
agent =
|
31 |
-
tools=[webTool], model=model
|
32 |
)
|
33 |
|
34 |
self.agent = agent
|
@@ -104,7 +98,7 @@ def run_and_submit_all( profile: gr.OAuthProfile | None):
|
|
104 |
task_id = item.get("task_id")
|
105 |
question_text = item.get("question")
|
106 |
question_file = item.get("file_name")
|
107 |
-
if question_file
|
108 |
print("skipping question with file")
|
109 |
continue
|
110 |
if not task_id or question_text is None:
|
|
|
4 |
import inspect
|
5 |
import pandas as pd
|
6 |
from smolagents import (
|
|
|
|
|
|
|
7 |
DuckDuckGoSearchTool,
|
8 |
+
CodeAgent
|
9 |
InferenceClientModel,
|
|
|
|
|
|
|
10 |
)
|
11 |
|
12 |
# (Keep Constants as is)
|
|
|
21 |
webTool = DuckDuckGoSearchTool()
|
22 |
model = InferenceClientModel("Qwen/Qwen2.5-72B-Instruct")
|
23 |
|
24 |
+
agent = CodeAgent(
|
25 |
+
tools=[webTool], model=model
|
26 |
)
|
27 |
|
28 |
self.agent = agent
|
|
|
98 |
task_id = item.get("task_id")
|
99 |
question_text = item.get("question")
|
100 |
question_file = item.get("file_name")
|
101 |
+
if question_file != "":
|
102 |
print("skipping question with file")
|
103 |
continue
|
104 |
if not task_id or question_text is None:
|