Spaces:
Sleeping
Sleeping
mchinea
commited on
Commit
·
fd14ef2
1
Parent(s):
0f5ec0d
update
Browse files- agent_smolagent.py +24 -2
agent_smolagent.py
CHANGED
@@ -14,7 +14,18 @@ from smolagents.default_tools import (DuckDuckGoSearchTool,
|
|
14 |
SpeechToTextTool,
|
15 |
PythonInterpreterTool)
|
16 |
#from final_answer import FinalAnswerTool, check_reasoning, ensure_formatting
|
17 |
-
from tools_smolagent import
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
18 |
|
19 |
load_dotenv()
|
20 |
|
@@ -49,7 +60,18 @@ def build_agent():
|
|
49 |
VisitWebpageTool(max_output_length=500000),
|
50 |
#WikipediaSearchTool(extract_format='HTML'),
|
51 |
SpeechToTextTool(),
|
52 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
53 |
],
|
54 |
managed_agents=[],
|
55 |
additional_authorized_imports=['os', 'pandas', 'numpy', 'PIL', 'tempfile', 'PIL.Image'],
|
|
|
14 |
SpeechToTextTool,
|
15 |
PythonInterpreterTool)
|
16 |
#from final_answer import FinalAnswerTool, check_reasoning, ensure_formatting
|
17 |
+
from tools_smolagent import (multiply,
|
18 |
+
add,
|
19 |
+
subtract,
|
20 |
+
divide,
|
21 |
+
modulus,
|
22 |
+
read_file,
|
23 |
+
extract_text_from_image,
|
24 |
+
analyze_csv_file,
|
25 |
+
analyze_excel_file,
|
26 |
+
youtube_transcribe,
|
27 |
+
transcribe_audio,
|
28 |
+
wikipedia_search)
|
29 |
|
30 |
load_dotenv()
|
31 |
|
|
|
60 |
VisitWebpageTool(max_output_length=500000),
|
61 |
#WikipediaSearchTool(extract_format='HTML'),
|
62 |
SpeechToTextTool(),
|
63 |
+
multiply,
|
64 |
+
add,
|
65 |
+
subtract,
|
66 |
+
divide,
|
67 |
+
modulus,
|
68 |
+
read_file,
|
69 |
+
extract_text_from_image,
|
70 |
+
analyze_csv_file,
|
71 |
+
analyze_excel_file,
|
72 |
+
youtube_transcribe,
|
73 |
+
transcribe_audio,
|
74 |
+
wikipedia_search
|
75 |
],
|
76 |
managed_agents=[],
|
77 |
additional_authorized_imports=['os', 'pandas', 'numpy', 'PIL', 'tempfile', 'PIL.Image'],
|