Commit
·
2922452
1
Parent(s):
7e2c9ef
added reverse tools
Browse files
app.py
CHANGED
|
@@ -3,7 +3,7 @@ import gradio as gr
|
|
| 3 |
import requests
|
| 4 |
import inspect
|
| 5 |
import pandas as pd
|
| 6 |
-
from smolagents import CodeAgent, InferenceClientModel, DuckDuckGoSearchTool, tool, ToolCallingAgent
|
| 7 |
from smolagents import OpenAIServerModel
|
| 8 |
from tools import analyze_image, get_youtube_transcript, reverse_text
|
| 9 |
|
|
@@ -58,7 +58,6 @@ universal_agent = CodeAgent(
|
|
| 58 |
max_steps=7,
|
| 59 |
)
|
| 60 |
|
| 61 |
-
|
| 62 |
def run_and_submit_all( profile: gr.OAuthProfile | None):
|
| 63 |
"""
|
| 64 |
Fetches all questions, runs the BasicAgent on them, submits all answers,
|
|
@@ -97,7 +96,12 @@ def run_and_submit_all( profile: gr.OAuthProfile | None):
|
|
| 97 |
# max_steps=7,
|
| 98 |
# )
|
| 99 |
|
| 100 |
-
team =
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 101 |
|
| 102 |
except Exception as e:
|
| 103 |
print(f"Error instantiating agent: {e}")
|
|
|
|
| 3 |
import requests
|
| 4 |
import inspect
|
| 5 |
import pandas as pd
|
| 6 |
+
from smolagents import CodeAgent, InferenceClientModel, DuckDuckGoSearchTool, tool, ToolCallingAgent
|
| 7 |
from smolagents import OpenAIServerModel
|
| 8 |
from tools import analyze_image, get_youtube_transcript, reverse_text
|
| 9 |
|
|
|
|
| 58 |
max_steps=7,
|
| 59 |
)
|
| 60 |
|
|
|
|
| 61 |
def run_and_submit_all( profile: gr.OAuthProfile | None):
|
| 62 |
"""
|
| 63 |
Fetches all questions, runs the BasicAgent on them, submits all answers,
|
|
|
|
| 96 |
# max_steps=7,
|
| 97 |
# )
|
| 98 |
|
| 99 |
+
team = CodeAgent(
|
| 100 |
+
tools=[],
|
| 101 |
+
model=openai_41mini_model,
|
| 102 |
+
managed_agents=[analyst, historian, universal_agent],
|
| 103 |
+
additional_authorized_imports=["time", "numpy", "pandas"],
|
| 104 |
+
)
|
| 105 |
|
| 106 |
except Exception as e:
|
| 107 |
print(f"Error instantiating agent: {e}")
|