Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -33,7 +33,6 @@ from smolagents import (
|
|
| 33 |
# (Keep Constants as is)
|
| 34 |
# --- Constants ---
|
| 35 |
DEFAULT_API_URL = "https://agents-course-unit4-scoring.hf.space"
|
| 36 |
-
HF_TOKEN = os.getenv("HF_TOKEN")
|
| 37 |
|
| 38 |
# --- Basic Agent Definition ---
|
| 39 |
#llm = ChatGroq(model="qwen-qwq-32b", temperature=0)
|
|
@@ -145,17 +144,7 @@ def run_and_submit_all( profile: gr.OAuthProfile | None):
|
|
| 145 |
|
| 146 |
# 1. Instantiate Agent ( modify this part to create your agent)
|
| 147 |
try:
|
| 148 |
-
|
| 149 |
-
agent = CodeAgent(
|
| 150 |
-
tools=tools,
|
| 151 |
-
model=model,
|
| 152 |
-
additional_authorized_imports=["*"],
|
| 153 |
-
executor_type='local',
|
| 154 |
-
executor_kwargs={},
|
| 155 |
-
max_steps=12,
|
| 156 |
-
verbosity_level=2,
|
| 157 |
-
planning_interval=4,
|
| 158 |
-
)
|
| 159 |
except Exception as e:
|
| 160 |
print(f"Error instantiating agent: {e}")
|
| 161 |
return f"Error initializing agent: {e}", None
|
|
|
|
| 33 |
# (Keep Constants as is)
|
| 34 |
# --- Constants ---
|
| 35 |
DEFAULT_API_URL = "https://agents-course-unit4-scoring.hf.space"
|
|
|
|
| 36 |
|
| 37 |
# --- Basic Agent Definition ---
|
| 38 |
#llm = ChatGroq(model="qwen-qwq-32b", temperature=0)
|
|
|
|
| 144 |
|
| 145 |
# 1. Instantiate Agent ( modify this part to create your agent)
|
| 146 |
try:
|
| 147 |
+
agent = BasicAgent()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 148 |
except Exception as e:
|
| 149 |
print(f"Error instantiating agent: {e}")
|
| 150 |
return f"Error initializing agent: {e}", None
|