Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -51,8 +51,7 @@ class SmolaAgent:
|
|
51 |
tools=[search_tool],
|
52 |
model=model,
|
53 |
add_base_tools=True,
|
54 |
-
verbosity_level=1
|
55 |
-
)
|
56 |
print("β
Step 4: CodeAgent initialized successfully")
|
57 |
print("β
SmolaAgent initialization completed successfully!")
|
58 |
|
@@ -60,12 +59,8 @@ class SmolaAgent:
|
|
60 |
print(f"β Step 4: CodeAgent initialization failed: {e}")
|
61 |
print(f"β Step 4: Error type: {type(e).__name__}")
|
62 |
raise
|
63 |
-
|
64 |
-
except
|
65 |
-
print(f"β Import Error: {e}")
|
66 |
-
print(f"β smolagents package may not be properly installed")
|
67 |
-
self.agent = None
|
68 |
-
except Exception as e:
|
69 |
print(f"β General initialization error: {e}")
|
70 |
print(f"β Error type: {type(e).__name__}")
|
71 |
print(f"β Falling back to None agent")
|
@@ -117,7 +112,9 @@ def run_and_submit_all( profile: gr.OAuthProfile | None):
|
|
117 |
|
118 |
api_url = DEFAULT_API_URL
|
119 |
questions_url = f"{api_url}/questions"
|
120 |
-
submit_url = f"{api_url}/submit"
|
|
|
|
|
121 |
try:
|
122 |
agent = SmolaAgent()
|
123 |
except Exception as e:
|
|
|
51 |
tools=[search_tool],
|
52 |
model=model,
|
53 |
add_base_tools=True,
|
54 |
+
verbosity_level=1 )
|
|
|
55 |
print("β
Step 4: CodeAgent initialized successfully")
|
56 |
print("β
SmolaAgent initialization completed successfully!")
|
57 |
|
|
|
59 |
print(f"β Step 4: CodeAgent initialization failed: {e}")
|
60 |
print(f"β Step 4: Error type: {type(e).__name__}")
|
61 |
raise
|
62 |
+
|
63 |
+
except Exception as e:
|
|
|
|
|
|
|
|
|
64 |
print(f"β General initialization error: {e}")
|
65 |
print(f"β Error type: {type(e).__name__}")
|
66 |
print(f"β Falling back to None agent")
|
|
|
112 |
|
113 |
api_url = DEFAULT_API_URL
|
114 |
questions_url = f"{api_url}/questions"
|
115 |
+
submit_url = f"{api_url}/submit"
|
116 |
+
|
117 |
+
# 1. Instantiate Agent ( modify this part to create your agent)
|
118 |
try:
|
119 |
agent = SmolaAgent()
|
120 |
except Exception as e:
|